├── activation └── src │ ├── activation.plist │ ├── ideviceactivation │ ├── ideviceactivation.c │ ├── output.txt │ └── ticket.plist ├── aes └── includes │ └── aes.h ├── arm ├── coprocessor.s └── src │ └── coprocessor.s ├── asr └── docs │ └── asr.txt ├── bdev ├── docs │ ├── bdev_callbacks.txt │ └── nand_bdev_stuff.txt ├── includes │ └── bdev.h └── src │ ├── bdev_read_block.c │ └── bdev_read_block2.c ├── clock ├── docs │ ├── clock_gates.txt │ ├── clockgate_list.txt │ └── clockgates.txt ├── includes │ └── clock.h └── src │ └── clock_gate_switch.c ├── cmd ├── includes │ └── commands.h └── src │ ├── bootx.c │ ├── commands.c │ ├── go.c │ └── ramdisk.c ├── common └── common.h ├── fs └── includes │ └── fs.h ├── hfs ├── includes │ ├── cache.h │ ├── ci.h │ ├── fs.h │ ├── hfs.h │ └── sl.h └── src │ └── hfsdebug.c ├── img2 ├── docs │ └── img2.txt └── includes │ └── img2.h ├── img3 └── includes │ └── img3.h ├── iokit └── get_devtree.objc ├── iop └── includes │ └── iop.h ├── lockdownd └── docs │ └── lockdownd.txt ├── memz ├── docs │ ├── imagedescriptor.txt │ ├── memz.txt │ └── nor_image.txt ├── includes │ ├── imagedescriptor.txt │ └── memz.h └── src │ └── memz.c ├── nand ├── bin │ └── ipt3_nand_llb.bin ├── docs │ ├── bdev_struct.txt │ ├── devicemap.txt │ ├── nand_abstractions.txt │ ├── nand_boot.txt │ ├── nand_labels.txt │ ├── nand_llb.log │ ├── nand_llb_header.txt │ ├── nand_llb_header_analysis.txt │ ├── nand_patterns.txt │ ├── nand_read_breakpoints.txt │ ├── nand_read_protos.txt │ ├── nand_structures.txt │ ├── partition_struct.txt │ └── partitions.txt ├── includes │ └── nand.h └── src │ └── nand.c ├── nvram └── includes │ └── nvram.h ├── pmgr └── pmgr_bf1 ├── rsa ├── certParser.idb ├── ibsscert1.txt ├── ibsscert2.txt └── rootcert.txt ├── sys ├── includes │ ├── heap.h │ └── lock.h └── src │ ├── free.c │ ├── lock.c │ └── malloc.c ├── task ├── docs │ ├── oneliners │ ├── poweroff_task.txt │ ├── task_list_data.txt │ └── task_struct.txt ├── includes │ ├── iboot.h │ └── task.h └── src │ ├── check_addr.pl │ ├── find_good.pl │ ├── hash.pl │ ├── search.pl │ ├── task_exit.c │ └── task_yield.c ├── uart ├── docs │ └── uart-output.txt └── includes │ └── uart.h ├── usb ├── dfu.h ├── usb.h ├── usb_controller_ops.h └── usb_structs.h ├── vic └── vic_table.txt ├── wdt ├── includes │ └── wdt.h └── src │ └── wdt_reboot.c ├── wifi ├── bcm_firmware_4.216.83.0.bin ├── bcm_firmware_4.216.83.0.idb └── bcm_firmware_4.216.83.0.tstdb └── xnu ├── defines ├── CONFIG_EMBEDDED.txt └── MAXPATHLEN.txt ├── functions ├── copyinstr.txt ├── snprintf.txt ├── strncat.txt ├── strtol.txt └── strtoul.txt ├── kexts ├── AppleAMC_r2.kext ├── AppleARMIISAudio.kext ├── AppleARMPL192VIC.kext ├── AppleARMPlatform.idb ├── AppleARMPlatform.kext ├── AppleBCMWLAN.kext ├── AppleBaseband.kext ├── AppleBluetooth.kext ├── AppleCD3282Mikey.kext ├── AppleCDMA.kext ├── AppleCS42L58Audio.kext ├── AppleD1755PMU.kext ├── AppleDiskImagesFileBackingStore.kext ├── AppleDiskImagesKernelBacked.kext ├── AppleDiskImagesRAMBackingStore.kext ├── AppleDiskImagesReadWriteDiskImage.kext ├── AppleDiskImagesUDIFDiskImage.kext ├── AppleEmbeddedAccelerometer.kext ├── AppleEmbeddedIOP.idb ├── AppleEmbeddedIOP.kext ├── AppleEmbeddedLightSensor.kext ├── AppleEmbeddedUSBAudio.idb ├── AppleEmbeddedUSBAudio.kext ├── AppleFSCompressionTypeZlib.idb ├── AppleFSCompressionTypeZlib.kext ├── AppleH2PDART.kext ├── AppleImage3NORAccess.kext ├── AppleJPEGDriver.kext ├── AppleKernelStorage.kext ├── AppleLM48557Amp.kext ├── AppleM2DisplayDrivers.kext ├── AppleM2ScalerCSC.kext ├── AppleM68Buttons.kext ├── AppleMobileFileIntegrity.idb ├── AppleMobileFileIntegrity.kext ├── AppleMultitouchSPI.kext ├── AppleNANDFTL.kext ├── AppleNANDFirmware.idb ├── AppleNANDFirmware.kext ├── AppleOnboardSerial.kext ├── ApplePinotLCD.kext ├── AppleReliableSerialLayer.kext ├── AppleS5L8720X.kext ├── AppleS5L8720XUSBPhy.kext ├── AppleS5L8900X.kext ├── AppleS5L8900XCrypto.kext ├── AppleS5L8900XSerial.kext ├── AppleS5L8920X.idb ├── AppleS5L8920X.kext ├── AppleS5L8920XARM7M.kext ├── AppleS5L8920XIOPFMI.kext ├── AppleS5L8920XIOPSDIO.kext ├── AppleS5L8920XSHA1.kext ├── AppleSerialMultiplexer.kext ├── AppleSynopsysOTG2.kext ├── AppleTetheredDevice.kext ├── AppleUSBComposite.kext ├── AppleUSBDeviceMux.kext ├── AppleUSBHub.kext ├── AppleUSBMergeNub.kext ├── AppleUSBMike.kext ├── AppleVXD375.kext ├── BasebandSPI.kext ├── CHUDKernLib.kext ├── CHUDProf.kext ├── H2H264VideoEncoder.kext ├── IO80211Family.kext ├── IOAccessoryManager.kext ├── IOAudio2Family.kext ├── IOCameraFamily.kext ├── IOCryptoAcceleratorFamily.kext ├── IOFlashNVRAM.idb ├── IOFlashNVRAM.kext ├── IOFlashStorage.kext ├── IOHDIXController.kext ├── IOHIDFamily.kext ├── IOMobileGraphicsFamily.kext ├── IONetworkingFamily.kext ├── IOSDIOFamily.kext ├── IOSerialFamily.kext ├── IOStorageFamily.kext ├── IOStreamFamily.kext ├── IOSurface.kext ├── IOTextEncryptionFamily.kext ├── IOUSBDeviceFamily.kext ├── IOUSBFamily.kext ├── IOUSBHIDDriver.kext ├── IOUSBUserClient.idb ├── IOUSBUserClient.kext ├── IOUserEthernet.kext ├── com.apple.IMGSGX535.kext ├── com.apple.nke.lttp.kext ├── com.apple.nke.ppp.idb ├── com.apple.nke.ppp.kext ├── com.apple.nke.pptp.kext ├── iPhone_Kexts.zip ├── security.mac_seatbelt.idb └── security.mac_seatbelt.kext ├── source ├── bsd │ ├── hfs │ │ ├── free.txt │ │ ├── malloc-to-free.txt │ │ └── malloc.txt │ └── kern │ │ └── bsd_init.txt └── osfmk │ ├── flawfinder.log │ ├── lintian.log │ └── rats.log └── syscalls ├── Makefile.inc ├── SYS.h ├── __ATPgetreq.s ├── __ATPgetrsp.s ├── __ATPsndreq.s ├── __ATPsndrsp.s ├── __ATgetmsg.s ├── __ATputmsg.s ├── __ATsocket.s ├── __accept.s ├── __accept_nocancel.s ├── __access.s ├── __access_extended.s ├── __acct.s ├── __add_profil.s ├── __adjtime.s ├── __aio_cancel.s ├── __aio_error.s ├── __aio_fsync.s ├── __aio_read.s ├── __aio_return.s ├── __aio_suspend.s ├── __aio_suspend_nocancel.s ├── __aio_write.s ├── __audit.s ├── __audit_session_join.s ├── __audit_session_self.s ├── __auditctl.s ├── __auditon.s ├── __bind.s ├── __bsdthread_create.s ├── __bsdthread_register.s ├── __bsdthread_terminate.s ├── __chdir.s ├── __chflags.s ├── __chmod.s ├── __chmod_extended.s ├── __chown.s ├── __chroot.s ├── __chud.s ├── __close.s ├── __close_nocancel.s ├── __connect.s ├── __connect_nocancel.s ├── __copyfile.s ├── __csops.s ├── __delete.s ├── __disable_threadsignal.s ├── __dup.s ├── __dup2.s ├── __exchangedata.s ├── __execve.s ├── __exit.s ├── __fchdir.s ├── __fchflags.s ├── __fchmod.s ├── __fchmod_extended.s ├── __fchown.s ├── __fcntl.s ├── __fcntl_nocancel.s ├── __fdatasync.s ├── __ffsctl.s ├── __fgetattrlist.s ├── __fgetxattr.s ├── __fhopen.s ├── __flistxattr.s ├── __flock.s ├── __fork.s ├── __fpathconf.s ├── __fremovexattr.s ├── __fsctl.s ├── __fsetattrlist.s ├── __fsetxattr.s ├── __fsgetpath.s ├── __fstat.s ├── __fstat64.s ├── __fstat64_extended.s ├── __fstat_extended.s ├── __fstatfs.s ├── __fstatfs64.s ├── __fstatv.s ├── __fsync.s ├── __fsync_nocancel.s ├── __ftruncate.s ├── __futimes.s ├── __getattrlist.s ├── __getaudit.s ├── __getaudit_addr.s ├── __getauid.s ├── __getdirentries.s ├── __getdirentries64.s ├── __getdirentriesattr.s ├── __getdtablesize.s ├── __getegid.s ├── __geteuid.s ├── __getfh.s ├── __getfsstat.s ├── __getfsstat64.s ├── __getgid.s ├── __getgroups.s ├── __gethostuuid.s ├── __getitimer.s ├── __getlcid.s ├── __getlogin.s ├── __getpeername.s ├── __getpgid.s ├── __getpgrp.s ├── __getpid.s ├── __getppid.s ├── __getpriority.s ├── __getrlimit.s ├── __getrusage.s ├── __getsgroups.s ├── __getsid.s ├── __getsockname.s ├── __getsockopt.s ├── __gettid.s ├── __gettimeofday.s ├── __getuid.s ├── __getwgroups.s ├── __getxattr.s ├── __identitysvc.s ├── __initgroups.s ├── __ioctl.s ├── __iopolicysys.s ├── __issetugid.s ├── __kdebug_trace.s ├── __kevent.s ├── __kevent64.s ├── __kill.s ├── __kqueue.s ├── __lchown.s ├── __link.s ├── __lio_listio.s ├── __listen.s ├── __listxattr.s ├── __lseek.s ├── __lstat.s ├── __lstat64.s ├── __lstat64_extended.s ├── __lstat_extended.s ├── __lstatv.s ├── __mac_execve.s ├── __mac_get_fd.s ├── __mac_get_file.s ├── __mac_get_lcid.s ├── __mac_get_lctx.s ├── __mac_get_link.s ├── __mac_get_mount.s ├── __mac_get_pid.s ├── __mac_get_proc.s ├── __mac_getfsstat.s ├── __mac_mount.s ├── __mac_set_fd.s ├── __mac_set_file.s ├── __mac_set_lctx.s ├── __mac_set_link.s ├── __mac_set_proc.s ├── __mac_syscall.s ├── __madvise.s ├── __mincore.s ├── __minherit.s ├── __mkcomplex.s ├── __mkdir.s ├── __mkdir_extended.s ├── __mkfifo.s ├── __mkfifo_extended.s ├── __mknod.s ├── __mlock.s ├── __mlockall.s ├── __mmap.s ├── __modwatch.s ├── __mount.s ├── __mprotect.s ├── __msgctl.s ├── __msgget.s ├── __msgrcv.s ├── __msgrcv_nocancel.s ├── __msgsnd.s ├── __msgsnd_nocancel.s ├── __msgsys.s ├── __msync.s ├── __msync_nocancel.s ├── __munlock.s ├── __munlockall.s ├── __munmap.s ├── __nfsclnt.s ├── __nfssvc.s ├── __old_semwait_signal.s ├── __old_semwait_signal_nocancel.s ├── __open.s ├── __open_extended.s ├── __open_nocancel.s ├── __pathconf.s ├── __pipe.s ├── __poll.s ├── __poll_nocancel.s ├── __posix_spawn.s ├── __pread.s ├── __pread_nocancel.s ├── __proc_info.s ├── __profil.s ├── __psynch_cvbroad.s ├── __psynch_cvsignal.s ├── __psynch_cvwait.s ├── __psynch_mutexdrop.s ├── __psynch_mutexwait.s ├── __psynch_rw_downgrade.s ├── __psynch_rw_longrdlock.s ├── __psynch_rw_rdlock.s ├── __psynch_rw_unlock.s ├── __psynch_rw_unlock2.s ├── __psynch_rw_upgrade.s ├── __psynch_rw_wrlock.s ├── __psynch_rw_yieldwrlock.s ├── __pthread_canceled.s ├── __pthread_chdir.s ├── __pthread_fchdir.s ├── __pthread_kill.s ├── __pthread_markcancel.s ├── __pthread_sigmask.s ├── __ptrace.s ├── __pwrite.s ├── __pwrite_nocancel.s ├── __quota.s ├── __quotactl.s ├── __read.s ├── __read_nocancel.s ├── __readlink.s ├── __readv.s ├── __readv_nocancel.s ├── __reboot.s ├── __recvfrom.s ├── __recvfrom_nocancel.s ├── __recvmsg.s ├── __recvmsg_nocancel.s ├── __removexattr.s ├── __rename.s ├── __revoke.s ├── __rmdir.s ├── __searchfs.s ├── __select.s ├── __select_nocancel.s ├── __sem_close.s ├── __sem_destroy.s ├── __sem_getvalue.s ├── __sem_init.s ├── __sem_open.s ├── __sem_post.s ├── __sem_trywait.s ├── __sem_unlink.s ├── __sem_wait.s ├── __sem_wait_nocancel.s ├── __semctl.s ├── __semget.s ├── __semop.s ├── __semsys.s ├── __semwait_signal.s ├── __semwait_signal_nocancel.s ├── __sendfile.s ├── __sendmsg.s ├── __sendmsg_nocancel.s ├── __sendto.s ├── __sendto_nocancel.s ├── __setattrlist.s ├── __setaudit.s ├── __setaudit_addr.s ├── __setauid.s ├── __setegid.s ├── __seteuid.s ├── __setgid.s ├── __setgroups.s ├── __setitimer.s ├── __setlcid.s ├── __setlogin.s ├── __setpgid.s ├── __setpriority.s ├── __setprivexec.s ├── __setquota.s ├── __setregid.s ├── __setreuid.s ├── __setrlimit.s ├── __setsgroups.s ├── __setsid.s ├── __setsockopt.s ├── __settid.s ├── __settid_with_pid.s ├── __settimeofday.s ├── __setuid.s ├── __setwgroups.s ├── __setxattr.s ├── __shared_region_check_np.s ├── __shared_region_map_np.s ├── __shm_open.s ├── __shm_unlink.s ├── __shmat.s ├── __shmctl.s ├── __shmdt.s ├── __shmget.s ├── __shmsys.s ├── __shutdown.s ├── __sigaction.s ├── __sigaltstack.s ├── __sigpending.s ├── __sigprocmask.s ├── __sigreturn.s ├── __sigsuspend.s ├── __sigsuspend_nocancel.s ├── __sigwait.s ├── __sigwait_nocancel.s ├── __socket.s ├── __socketpair.s ├── __stack_snapshot.s ├── __stat.s ├── __stat64.s ├── __stat64_extended.s ├── __stat_extended.s ├── __statfs.s ├── __statfs64.s ├── __statv.s ├── __swapon.s ├── __symlink.s ├── __sync.s ├── __syscall.s ├── __sysctl.s ├── __thread_selfid.s ├── __truncate.s ├── __umask.s ├── __umask_extended.s ├── __undelete.s ├── __unlink.s ├── __unmount.s ├── __utimes.s ├── __vfork.s ├── __vm_pressure_monitor.s ├── __wait4.s ├── __wait4_nocancel.s ├── __waitevent.s ├── __waitid.s ├── __waitid_nocancel.s ├── __watchevent.s ├── __workq_kernreturn.s ├── __workq_open.s ├── __write.s ├── __write_nocancel.s ├── __writev.s ├── __writev_nocancel.s ├── custom.s └── libsyscall.list /activation/src/ideviceactivation: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/activation/src/ideviceactivation -------------------------------------------------------------------------------- /activation/src/output.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 Apple WebObjects 2 | x-apple-date-generated: Wed, 02 Jun 2010 23:34:29 GMT 3 | x-webobjects-loadaverage: 1 4 | content-type: text/xml; charset=UTF-8 5 | content-length: 4677 6 | Set-Cookie: NSC_bmvocsjdl_qspe-mc=44cf9618a86c;path=/ 7 | 8 | -------------------------------------------------------------------------------- /aes/includes/aes.h: -------------------------------------------------------------------------------- 1 | typedef enum { 2 | kAesTypeGid 0x20000200, 3 | kAesTypeUid 0x20000201 4 | } AesType; 5 | 6 | typedef enum { 7 | kAesEncrypt = 0x10, 8 | kAesDecrypt = 0x11 9 | } AesOption; 10 | 11 | typedef enum { 12 | kAesMode128 = 0x00000000, 13 | kAesMode192 = 0x10000000, 14 | kAesMode256 = 0x20000000 15 | } AesMode; 16 | 17 | typedef enum { 18 | kAesSize128 = 0x20, 19 | kAesSize192 = 0x28, 20 | kAesSize256 = 0x30 21 | } AesSize; 22 | 23 | int aes_crypto_cmd(int option, void* input, void* output, int size, int mode, void* iv, void* key); 24 | -------------------------------------------------------------------------------- /arm/coprocessor.s: -------------------------------------------------------------------------------- 1 | clear_dcache: 2 | mov r2, #0x2000 3 | 4 | outside: 5 | sub r2, r2, #0x40 6 | mov r1, #0 7 | 8 | inside: 9 | subs r1, r1, #0x40000000 10 | orr r0, r1, r2 11 | mcr p15, 0, r0, c7, c10, 2 12 | bne inside 13 | cmp r2, #0 14 | bne outside 15 | mov r0, #0 16 | mcr p15, 0, r0, c7, c10, 4 17 | bx lr 18 | 19 | 20 | -------------------------------------------------------------------------------- /arm/src/coprocessor.s: -------------------------------------------------------------------------------- 1 | clear_dcache: 2 | mov r2, #0x2000 3 | 4 | outside: 5 | sub r2, r2, #0x40 6 | mov r1, #0 7 | 8 | inside: 9 | subs r1, r1, #0x40000000 10 | orr r0, r1, r2 11 | mcr p15, 0, r0, c7, c10, 2 12 | bne inside 13 | cmp r2, #0 14 | bne outside 15 | mov r0, #0 16 | mcr p15, 0, r0, c7, c10, 4 17 | bx lr 18 | 19 | 20 | -------------------------------------------------------------------------------- /asr/docs/asr.txt: -------------------------------------------------------------------------------- 1 | /usr/sbin/asr 2 | Multicast Server/Client Hybrid 3 | used to install disk image over com.apple.restored service 4 | 5 | =Commands= 6 | "Transfer Debug" 7 | XDBG OOB retransmit %qd length %ld 8 | XDBG failed request for %lu bytes at position %llu 9 | 10 | "Transfer Error" 11 | XERR Mounted volume! 12 | 13 | "Transfer Status" 14 | XSTA %s 15 | XSTA Error: %s 16 | XSTA Retry %sm 17 | XSTA fail 18 | XSTA fail: checksum failure 19 | XSTA fail: packet loss 20 | XSTA fail: stream timed out 21 | XSTA finish 22 | XSTA fsck 23 | XSTA fsck recovery 24 | XSTA metadata 25 | XSTA pass %d 26 | XSTA restore 27 | XSTA setup 28 | XSTA start %g adjust 29 | XSTA start %g client 30 | XSTA start %g multicast-client 31 | XSTA start %g multicast-server 32 | XSTA start %g thaw 33 | XSTA thaw 34 | XSTA verify 35 | XSTA wait 36 | 37 | "Transfer ??" 38 | XVDG forward error correction at %llu 39 | XVDG missed stream data %ld packets at position %lld 40 | XVDG streambuffer blocked 41 | 42 | "Progress Info" 43 | PINF %d 100 %s 44 | PINF %d 100 verify 45 | 46 | "Proress Stop" 47 | PSTP 100 100 stop fsck %s 48 | PSTP 100 100 stop restore 49 | PSTP 100 100 stop restore%s 50 | PSTP 100 100 stop verify 51 | 52 | "Progress Start" 53 | PSTT 0 100 start fsck %s 54 | PSTT 0 100 start restore 55 | PSTT 0 100 start restore loop 56 | PSTT 0 100 start restore retry 57 | PSTT 0 100 start verify 58 | -------------------------------------------------------------------------------- /bdev/docs/bdev_callbacks.txt: -------------------------------------------------------------------------------- 1 | nand_firmware: 2 | e9 ba f1 4f (0x4ff1bae9) blockdev_read_hook() 3 | 09 ec f0 4f (0x4ff0ec09) default_block_read() 4 | 59 b9 f1 4f (0x4ff1b959) blockdev_write_hook() 5 | 31 b9 f1 4f (0x4ff1b931) default_block_write() 6 | a1 e9 f0 4f (0x4ff0e9a1) default_block_erase() 7 | 8 | nand0a: 9 | 81 bc f1 4f (0x4ff1bc81) blockdev_read_hook() 10 | e1 bc f1 4f (0x4ff1bce1) default_block_read() 11 | 69 bd f1 4f (0x4ff1bd69) blockdev_write_hook() 12 | c9 bd f1 4f (0x4ff1bdc9) default_block_write() 13 | 1d b9 f1 4f (0x4ff1b91d) default_block_erase() 14 | -------------------------------------------------------------------------------- /bdev/docs/nand_bdev_stuff.txt: -------------------------------------------------------------------------------- 1 | NAND_BlockDevice: 0x50 @ 0x4ff2a3a0 2 | ] hexdump 0x50 3 | 0x4ff2a3a0:(0x00) a5 b1 f0 4f (0x4ff0b1a5) - YaFTL_Init 4 | (0x04) b9 a5 f0 4f (0x4ff0a5b9) - YaFTL_Open 5 | (0x08) 65 96 f0 4f (0x4ff09665) - YaFTL_Read 6 | (0x0C) 01 92 f0 4f (0x4ff09201) 7 | 0x4ff2a3b0:(0x10) 7d 90 f0 4f (0x4ff0907d) 8 | (0x14) 00 00 00 00 9 | (0x18) 19 8e f0 4f (0x4ff08e19) 10 | (0x1C) dd 8d f0 4f (0x4ff08ddd) 11 | 0x4ff2a3c0:(0x20) 69 8f f0 4f (0x4ff08f69) 12 | (0x24) f1 87 f0 4f (0x4ff087fa) 13 | (0x28) 09 86 f0 4f (0x4ff08609) 14 | (0x2C) 45 8d f0 4f (0x4ff08d45) 15 | 0x4ff2a3d0:(0x30) 71 86 f0 4f (0x4ff08671) 16 | (0x34) e1 85 f0 4f (0x4ff085e1) 17 | (0x38) 00 00 00 00 18 | (0x3C) 15 1d f0 4f (0x4ff01d15) 19 | 0x4ff2a3e0:(0x40) d5 85 f0 4f (0x4ff085d5) 20 | (0x44) 00 00 00 00 21 | (0x48) 00 00 00 00 22 | (0x4C) 00 00 00 00 23 | 0x4ff2a3f0:(0x50) 00 00 00 00 24 | (0x54) 00 00 00 00 25 | (0x58) 00 00 00 00 26 | (0x5C) 00 00 00 00 27 | 28 | 29 | 30 | blockdev_read_hook: 31 | (0x4ff1bc81) nand 32 | (0x4ff1bae9) (blockdev_read_hook) 33 | 34 | default_block_read: 35 | (0x4ff1bce1) 36 | (0x4ff06391) (nand_read_block_hook) (0x4ff08e19) 37 | (0x4ff0fe59) 38 | (0x4ff0ec09) (none) 39 | 40 | blockdev_write_hook: 41 | (0x4ff1bd69) (nand) 42 | (0x4ff1b959) (blockdev_write_hook) 43 | 44 | default_block_write: 45 | (0x4ff1bdc9) (nand_write_block_hook) 46 | (0x4ff1b931) ("no reasonable default block write routine") 47 | 48 | default_block_erase: 49 | (0x4ff1b91d) ("no reasonable default erase routine") 50 | (0x4ff0e9a1) (nand_firmware_erase_block_handler) 51 | 52 | 53 | 54 | (nand0b) 55 | (0x4ff1bc81) 56 | (0x4ff1bce1) 57 | (0x4ff1bd69) 58 | (0x4ff1bdc9) 59 | (0x4ff1b91d) 60 | 61 | (nand0a) 62 | (0x4ff1bc81) 63 | (0x4ff1bce1) 64 | (0x4ff1bd69) 65 | (0x4ff1bdc9) 66 | (0x4ff1b91d) 67 | 68 | (nand0) 69 | (0x4ff1bae9) 70 | (0x4ff06391) 71 | (0x4ff1b959) 72 | (0x4ff1b931) 73 | (0x4ff1b91d) 74 | 75 | (nand_syscfg) 76 | (0x4ff1bae9) 77 | (0x4ff0fe59) 78 | (0x4ff1b959) 79 | (0x4ff1b931) 80 | (0x4ff1b91d) 81 | 82 | (nand_firmware) 83 | (0x4ff1bae9) 84 | (0x4ff0ec09) 85 | (0x4ff1b959) 86 | (0x4ff1b931) 87 | (0x4ff0e9a1) 88 | 89 | (nand_llb) 90 | (0x4ff1bae9) 91 | (0x4ff0ec09) 92 | (0x4ff1b959) 93 | (0x4ff1b931) 94 | (0x4ff0e9a1) 95 | 96 | -------------------------------------------------------------------------------- /bdev/includes/bdev.h: -------------------------------------------------------------------------------- 1 | typedef struct BlockDevice { 2 | struct BlockDevice* next; 3 | unsigned int unk4; 4 | unsigned int blockSize; 5 | unsigned int blockCount; 6 | unsigned int unk10; 7 | unsigned long long totalBytes; 8 | int(*blockdev_read_hook)(struct BlockDevice* bdev, void* address, unsigned int offset, unsigned int unknown, unsigned int size); 9 | int(*default_block_read)(struct BlockDevice* bdev, void* address, unsigned int startBlock, unsigned int blockCount); 10 | int(*blockdev_write_hook)(struct BlockDevice* bdev, void* address, unsigned int offset, unsigned int unknown, unsigned int size); 11 | int(*default_block_write)(struct BlockDevice* bdev, void* address, unsigned int startBlock, unsigned int blockCount); 12 | int(*default_block_erase)(void); 13 | char bdevName[16]; 14 | } BlockDevice; 15 | 16 | int blockdev_read_hook(void* bdev, void* destination, unsigned int source, unsigned int offset, unsigned int size); 17 | int default_block_read(void* bdev, void* address, unsigned int startBlock, unsigned int blockCount); 18 | int blockdev_write_hook(void* bdev, void* address, unsigned int offset, unsigned int unknown, unsigned int size); 19 | int default_block_write(void* bdev, void* address, unsigned int startBlock, unsigned int blockCount); 20 | int default_block_erase(void); 21 | -------------------------------------------------------------------------------- /bdev/src/bdev_read_block2.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int bdev_write_block(void* bdev, void* source, void* destination, unsigned int size) { 4 | unsigned int blockSize = 0x80; 5 | blockSize += (blockSize << 1); 6 | if(strcmp(bdev->name, "nand_firmware")) { 7 | if(strcmp(bdev->name, "nand_llb")) { 8 | printf("ERROR: bad bdev: %s\n", bdev->name); 9 | return -1; 10 | 11 | } else { 12 | unsigned int startBlock = 0x0; 13 | unsigned int blockCount = 0x1; 14 | unsigned int firstOffset = startBlock * blockSize; 15 | } 16 | 17 | } else { 18 | unsigned int startBlock = 0x8; 19 | unsigned int blockCount = 0x8; 20 | unsigned int firstOffset = startBlock * blockSize; 21 | } 22 | 23 | 24 | 25 | 26 | unsigned int lastBlock = blockCount += startBlock; 27 | void* target = destination + firstOffset; 28 | unsigned int lastOffset = lastBlock * blockSize; 29 | if((lastOffset - 1) < (target + (size - 1)) { 30 | printf("ERROR: 0x%08X-0x%08X not within 0x%08X-0x%08X", target, (target + (size - 1)), firstOffset, lastOffset-1); 31 | return -1; 32 | } 33 | 34 | void* current = source; 35 | cnt = 0; 36 | source = target; 37 | 38 | 39 | while(source < end) { 40 | destination = ( source * 0xAAAAAAAB) >> 1; 41 | 42 | if(blockCount != 0 && destination != 0x4b1) { 43 | blockCount = 0; 44 | while(blockCount < 0x8) { 45 | void* fil = FIL_GetCallbacks(); 46 | int bytesRead = fil->hfmiReadBootPage(blockNumber, destination, 0x4ff35300); 47 | 48 | if(bytesRead != 0) { 49 | blockNumber = 1; 50 | 0x4FF2A43C = blockCount 51 | break; 52 | 53 | } else { 54 | blockNumber++; 55 | } 56 | 57 | } 58 | 59 | if(blockNumber == 0) { 60 | r11 = 0x4FF2A440; 61 | 62 | } else { 63 | break; 64 | } 65 | 66 | } else { 67 | r11 = 0x4FF2A440; 68 | } 69 | 70 | destination = source * 0xAAAAAAAB; 71 | memcpy(current, source, 0x200); 72 | } 73 | 74 | return cnt 75 | 76 | } 77 | -------------------------------------------------------------------------------- /clock/docs/clock_gates.txt: -------------------------------------------------------------------------------- 1 | clockgates: 2 | CDMA = 0x25 3 | NAND = 0x34/0x35 4 | SHA1 = 0x22 5 | Display = 0x2F/0x2B 6 | -------------------------------------------------------------------------------- /clock/docs/clockgate_list.txt: -------------------------------------------------------------------------------- 1 | 0x10 = sdio 2 | 0x11 = sha1 3 | 0x12 = ceata 4 | 0x13 = flash-controller0 5 | 0x14 = flash-controller0 6 | 0x15 = spi0 7 | 0x16 = spi1 8 | 0x17 9 | 0x18 10 | 0x19 11 | 0x1A = uart0 12 | 0x1B = uart1 13 | 0x1C 14 | 0x1D 15 | 0x1E 16 | 0x1F = pke 17 | 0x20 = i2c0 18 | 0x21 19 | 0x22 = i2c2 20 | 0x23 21 | 0x24 = otgphyctrl 22 | 0x25 = usb-otg 23 | 0x26 24 | 0x27 = iop 25 | 0x28 = vxd 26 | 0x29 = sgx 27 | 0x2A = clcd 28 | 0x2B = scaler 29 | 0x2C = tv-out 30 | 0x2D = dart0 31 | 0x2E = venc 32 | 0x2F = jpeg 33 | 0x30 34 | 0x31 35 | 0x32 36 | 0x33 = dart1 37 | 0x34 = mipi-dsim 38 | 0x35 = swi 39 | 0x36 = swi 40 | 0x37 = audio-complex 41 | 0x38 = amc 42 | 0x39 = i2s0 43 | 0x40 44 | -------------------------------------------------------------------------------- /clock/docs/clockgates.txt: -------------------------------------------------------------------------------- 1 | Entering recovery mode, starting command prompt 2 | ] hexdump 0xbf100000 0x60 3 | 0xbf100000: 82 00 00 00 03 00 00 00 05 00 00 00 07 00 00 00 4 | 0xbf100010: 03 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 5 | 0xbf100020: 02 00 00 00 02 00 00 00 03 00 00 00 01 00 00 00 6 | 0xbf100030: 01 00 00 00 02 00 00 00 30 00 00 00 00 00 00 00 7 | 0xbf100040: 01 00 00 00 00 00 00 00 04 00 00 00 01 00 00 00 8 | 0xbf100050: 18 00 00 00 18 00 00 00 18 00 00 00 01 00 00 00 9 | 10 | ] hexdump 0xbf100060 0x60 11 | 0xbf100060: 04 00 00 00 00 00 00 00 0f 00 00 00 03 00 00 00 12 | 0xbf100070: 01 00 00 00 00 00 00 00 0f 00 00 00 0f 00 00 00 13 | 0xbf100080: 00 00 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 14 | 0xbf100090: 00 00 00 00 00 00 00 00 0f 00 00 00 00 00 00 00 15 | 0xbf1000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 | 0xbf1000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 17 | 18 | ] hexdump 0xbf1000c0 0x60 19 | 0xbf1000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 | 0xbf1000d0: 00 00 00 00 00 00 00 00 0f 00 00 00 0f 00 00 00 21 | 0xbf1000e0: 00 00 00 00 0f 00 00 00 0f 00 00 00 0f 00 00 00 22 | 0xbf1000f0: 0f 00 00 00 0f 00 00 00 0f 00 00 00 00 00 00 00 23 | 0xbf100100: 00 00 00 00 00 00 00 00 0f 00 00 00 0f 00 00 00 24 | 0xbf100110: 0f 00 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 25 | 26 | ] hexdump 0xbf100120 0x60 27 | 0xbf100120: 00 00 00 00 0f 00 00 00 0f 00 00 00 00 00 00 00 28 | 0xbf100130: 00 00 00 00 0f 00 00 00 00 00 00 00 0f 00 00 00 29 | 0xbf100140: 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00 30 | 0xbf100150: 10 00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 31 | 0xbf100160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 32 | 0xbf100170: 00 00 00 00 00 00 00 00 08 00 00 00 83 00 00 00 33 | 34 | ] hexdump 0xbf100180 0x60 35 | 0xbf100180: 21 00 00 00 ac 00 00 00 6e 00 00 00 a0 00 00 00 36 | 0xbf100190: 36 00 00 00 74 00 00 00 00 00 00 00 04 00 00 00 37 | 0xbf1001a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 | 0xbf1001b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 39 | 0xbf1001c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 | 0xbf1001d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 41 | -------------------------------------------------------------------------------- /clock/includes/clock.h: -------------------------------------------------------------------------------- 1 | #define CLOCK_GATE_BASE 0xBF100078 2 | #define CLOCK_GATE_MAX 0xBF100144 3 | -------------------------------------------------------------------------------- /clock/src/clock_gate_switch.c: -------------------------------------------------------------------------------- 1 | #define CLOCK_GATE_BASE 0xBF100078 2 | #define CLOCK_GATE_MAX 0xBF100144 3 | 4 | void clock_gate_switch(unsigned int gate, unsigned int value) { 5 | void* clockgate = ((gate << 2) + CLOCK_GATE_BASE); 6 | if(clockgate < CLOCK_GATE_MAX) { 7 | if(value) *clockgate |= 0xF; 8 | else *clockgate &= ~0xF; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /cmd/includes/commands.h: -------------------------------------------------------------------------------- 1 | #define kCmdStringArg 0 2 | #define kCmdIntegerArg 1 3 | 4 | typedef struct { 5 | signed int unk1; 6 | unsigned int uinteger; 7 | signed int integer; 8 | unsigned int type; 9 | unsigned char* string; 10 | } CmdArg; 11 | 12 | typedef int(*CmdFunction)(int argc, CmdArg* argv); 13 | 14 | typedef struct { 15 | char* name; 16 | CmdFunction handler; 17 | char* description; 18 | } CmdInfo; 19 | 20 | //cmd_bootx(int argc, CmdArg* argv); 21 | -------------------------------------------------------------------------------- /cmd/src/bootx.c: -------------------------------------------------------------------------------- 1 | #define kLoadAddress 0x41000000 2 | #define kKernelMaxSize 0xF00000 3 | 4 | int cmd_bootx(int argv, CmdArg* argv) { 5 | void* address = NULL; 6 | if(argc > 1 && !strcmp("help", argv[1].string)) { 7 | printf("usage:\n\t%s [
]\n", argv[0].string); 8 | return -1; 9 | } 10 | 11 | if(range_check(kLoadAddress, kKernelMaxSize) < 0) { 12 | printf("Permission Denied\n"); 13 | return -1; 14 | } 15 | 16 | printf("Attempting to validate kernelcache @ 0x%08x\n", kLoadAddress); 17 | int err = load_macho_image(kLoadAddress, kKernelMaxSize, &address) 18 | if(err >= 0) { 19 | printf("kernelcache prepped at address 0x%08x\n", address); 20 | jump_to(3, address, gBootArgs); 21 | 22 | } else { 23 | printf("error loading kernelcache\n"); 24 | } 25 | 26 | return err; 27 | } 28 | -------------------------------------------------------------------------------- /cmd/src/commands.c: -------------------------------------------------------------------------------- 1 | #define kLoadAddress 0x41000000 2 | #define kKernelMaxSize 0xF00000 3 | 4 | int cmd_bootx(int argv, CmdArg* argv) { 5 | void* address = NULL; 6 | if(argc > 1 && !strcmp("help", argv[1].string)) { 7 | printf("usage:\n\t%s [
]\n", argv[0].string); 8 | return -1; 9 | } 10 | 11 | if(range_check(kLoadAddress, kKernelMaxSize) < 0) { 12 | printf("Permission Denied\n"); 13 | return -1; 14 | } 15 | 16 | printf("Attempting to validate kernelcache @ 0x%08x\n", kLoadAddress); 17 | int err = load_macho_image(kLoadAddress, kKernelMaxSize, &address) 18 | if(err >= 0) { 19 | printf("kernelcache prepped at address 0x%08x\n", address); 20 | jump_to(3, address, gBootArgs); 21 | 22 | } else { 23 | printf("error loading kernelcache\n"); 24 | } 25 | 26 | return err; 27 | } 28 | -------------------------------------------------------------------------------- /cmd/src/go.c: -------------------------------------------------------------------------------- 1 | #define kImageTypeiBEC 0x69626563 2 | #define kImageAddress 0x43000000 3 | #define kImageMaxSize 0xF00000 4 | 5 | int cmd_go(int argc, CmdArg* argv) { 6 | 7 | if(argc > 1) { 8 | if(!strcmp("help", argv[1].string)) { 9 | printf("%s [
]\n", argv[0].string); 10 | return -1; 11 | 12 | } else { 13 | address = argv[1].uinteger; 14 | } 15 | } 16 | 17 | while(1) { 18 | if(range_check(address, 0xF00000) == NULL) { 19 | printf("Permission Denied\n"); 20 | break; 21 | } 22 | 23 | MemzDescriptor* memz = memz_create(address, 0xF00000, 1); 24 | if(memz == NULL) { 25 | printf("Memory image corrupt\n"); 26 | break; 27 | } 28 | 29 | unsigned int size = kImageMaxSize; 30 | unsigned char* address = kImageAddress; 31 | if(image_load(memz, kImageTypeiBEC, &dest, &size) < 0) { 32 | printf("Memory image not valid\n"); 33 | break; 34 | } 35 | 36 | printf("jumping into image at 0x%08x\n", address); 37 | jump_to(0, address, NULL); 38 | } 39 | 40 | return -1; 41 | } 42 | -------------------------------------------------------------------------------- /cmd/src/ramdisk.c: -------------------------------------------------------------------------------- 1 | #define kLoadAddress 0x41000000 2 | #define kRamdiskMaxSize 0x2000000 3 | #define kRamdiskAddress 0x44000000 4 | #define kRamdiskImageType 0x7264736B 5 | 6 | unsigned int* gRamdiskSize; 7 | unsigned char** gRamdiskAddr; 8 | 9 | int cmd_ramdisk(int argc, CmdArg* argv) { 10 | unsigned int filesize = 0; 11 | unsigned char* loadaddr = NULL; 12 | if(argc > 3 || !strcmp("help", argv[1].string)) { 13 | printf("usage:\n\t%s [] [
]\n", argv[0].string); 14 | return -1; 15 | } 16 | 17 | filesize = (unsigned int) nvram_getint("filesize", 0); 18 | loadaddr = (unsigned char*) nvram_getint("loadaddr", kLoadAddress); 19 | if(filesize == 0) { 20 | printf("filesize variable invalid or not set, aborting\n"); 21 | return -1; 22 | } 23 | 24 | if(range_check(loadaddr, filesize) == 0) { 25 | printf("Permission Denied\n"); 26 | return -1; 27 | } 28 | 29 | MemzDescriptor* memz = memz_create(loadaddr, filesize, 0); 30 | if(memz == NULL) { 31 | printf("Ramdisk image not valid\n"); 32 | return -1; 33 | } 34 | 35 | if(memz->imageSize > kRamdiskMaxSize) { 36 | printf("Ramdisk too large\n"); 37 | return -1; 38 | } 39 | 40 | *gRamdiskAddr = kRamdiskAddress; 41 | *gRamdiskSize = memz->imageSize; 42 | if(image_load(memz, kRamdiskImageType, gRamdiskAddr, gRamdiskSize) >= 0) { 43 | printf("creating ramdisk at 0x%x of size 0x%x, from image at 0x%x\n", gRamdiskAddr, gRamdiskSize, loadaddr); 44 | return 0; 45 | } 46 | 47 | *gRamdiskAddr = 0; 48 | *gRamdiskSize = 0; 49 | return -1; 50 | } 51 | -------------------------------------------------------------------------------- /common/common.h: -------------------------------------------------------------------------------- 1 | enum Boolean { 2 | FALSE = 0, 3 | TRUE = 1 4 | }; 5 | 6 | enum OnOff { 7 | OFF = 0, 8 | ON = 1 9 | }; 10 | 11 | typedef struct LinkedList { 12 | void* prev; 13 | void* next; 14 | }; 15 | 16 | void panic(const char* function, char* message, ...); 17 | -------------------------------------------------------------------------------- /fs/includes/fs.h: -------------------------------------------------------------------------------- 1 | void fs_unmount(const char* path); 2 | int fs_load_file(const char* path, void* address, unsigned int* size); 3 | void fs_mount(const char* partition, const char* type, const char* path); 4 | -------------------------------------------------------------------------------- /hfs/includes/cache.h: -------------------------------------------------------------------------------- 1 | struct CacheEntry { 2 | CICell ih; 3 | long time; 4 | long long offset; 5 | }; 6 | 7 | enum { 8 | kCacheSize kFSCacheSize 9 | kCacheMinBlockSize 0x200 10 | kCacheMaxBlockSize 0x4000 11 | kCacheMaxEntries kCacheSize / 0x200 12 | }; 13 | -------------------------------------------------------------------------------- /hfs/includes/fs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/hfs/includes/fs.h -------------------------------------------------------------------------------- /hfs/includes/sl.h: -------------------------------------------------------------------------------- 1 | // Device Types 2 | enum { 3 | kUnknownDeviceType = 0, 4 | kNetworkDeviceType = 1, 5 | kBlockDeviceType = 2 6 | }; 7 | 8 | // File Permissions and Types 9 | enum { 10 | kPermOtherExecute = 0x1, 11 | kPermOtherWrite = 0x2, 12 | kPermOtherRead = 0x4, 13 | kPermGroupExecute = 0x8, 14 | kPermGroupWrite = 0x10, 15 | kPermGroupRead = 0x20, 16 | kPermOwnerExecute = 0x40, 17 | kPermOwnerWrite = 0x80, 18 | kPermOwnerRead = 0x100, 19 | kPermMask = 0x1FF, 20 | kOwnerNotRoot = 0x200, 21 | kFileTypeUnknown = 0x0, 22 | kFileTypeFlat = 0x10000, 23 | kFileTypeDirectory = 0x20000, 24 | kFileTypeLink = 0x30000, 25 | kFileTypeMask = 0x30000 26 | }; 27 | 28 | // Key Numbers 29 | enum { 30 | kCommandKey = 0x200, 31 | kOptKey = 0x201, 32 | kShiftKey = 0x202, 33 | kControlKey = 0x203, 34 | kDeleteKey = 0x204 35 | }; 36 | 37 | // Boot Modes 38 | enum { 39 | kBootModeNormal = 0, 40 | kBootModeSafe = 1, 41 | kBootModeSecure = 2 42 | }; 43 | 44 | // types for plist.c 45 | typedef enum { 46 | kTagTypeNone = 0, 47 | kTagTypeDict = 1, 48 | kTagTypeKey = 2, 49 | kTagTypeString = 3, 50 | kTagTypeInteger = 4, 51 | kTagTypeData = 5, 52 | kTagTypeDate = 6, 53 | kTagTypeFalse = 7, 54 | kTagTypeTrue = 8, 55 | kTagTypeArray = 9 56 | } TagType; 57 | 58 | struct Tag { 59 | enum TagType type; 60 | char *string; 61 | struct Tag *tag; 62 | struct Tag *tagNext; 63 | }; 64 | -------------------------------------------------------------------------------- /img2/docs/img2.txt: -------------------------------------------------------------------------------- 1 | 0x4ff35088: bdev: 0x4ff35288 type: ibot offset: 0x00600 len: 0x2a999 2 | 0x4ff350c0: bdev: 0x4ff35288 type: dtre offset: 0x2b200 len: 0x8c19 3 | 0x4ff350f8: bdev: 0x4ff35288 type: logo offset: 0x34200 len: 0x25d9 4 | 0x4ff35130: bdev: 0x4ff35288 type: recm offset: 0x36c00 len: 0xbb59 5 | 0x4ff35168: bdev: 0x4ff35288 type: nsrv offset: 0x42c00 len: 0x5019 6 | 0x4ff351a0: bdev: 0x4ff35288 type: bat0 offset: 0x48000 len: 0xde19 7 | 0x4ff351d8: bdev: 0x4ff35288 type: bat1 offset: 0x56400 len: 0xff59 8 | 0x4ff35210: bdev: 0x4ff35288 type: glyC offset: 0x66600 len: 0x4fd9 9 | 0x4ff35248: bdev: 0x4ff35288 type: glyP offset: 0x6ba00 len: 0x4bd9 10 | 0x4ff316c8: bdev: 0x4ff35288 type: chg0 offset: 0x70800 len: 0x4d59 11 | 0x4ff31700: bdev: 0x4ff35288 type: chg1 offset: 0x75600 len: 0x6199 12 | 0x4ff31740: bdev: 0x4ff35288 type: batF offset: 0x7bc00 len: 0x12999 13 | 14 | 15 | 0x41000000: 32 47 4d 49 (0x494d4732) IMG2 16 | 00 02 00 00 (0x200) blockSize 17 | 00 00 00 00 (0x0) 18 | 03 00 00 00 (0x3) startBlock 19 | 0x41000010: fd 0b 00 00 (0xBFD) blockCount 20 | 00 00 00 00 (0x0) 21 | 00 00 00 00 (0x0) 22 | 00 00 00 00 (0x0) 23 | 0x41000020: 00 00 00 00 (0x0) 24 | 00 00 00 00 (0x0) 25 | 00 00 00 00 (0x0) 26 | 00 00 00 00 (0x0) 27 | 0x41000030: 71 5b 20 48 (0x48205B71) crc32 28 | 00 00 00 00 29 | 00 00 00 00 30 | 00 00 00 00 31 | 0x41000040: 00 00 00 00 32 | 00 00 00 00 33 | 00 00 00 00 34 | 00 00 00 00 35 | 0x41000050: 00 00 00 00 36 | 00 00 00 00 37 | 00 00 00 00 38 | 00 00 00 00 39 | 40 | 41 | -------------------------------------------------------------------------------- /img2/includes/img2.h: -------------------------------------------------------------------------------- 1 | typedef struct ImageImg2Container { 2 | unsigned int signature; 3 | unsigned int blockSize; 4 | unsigned int unk0x8; 5 | unsigned int unk0xC; 6 | unsigned int unk0x10; 7 | unsigned int unk0x14; 8 | unsigned int unk0x18; 9 | unsigned int unk0x1C; 10 | unsigned int unk0x20; 11 | unsigned int unk0x24; 12 | unsigned int unk0x28; 13 | unsigned int unk0x2C; 14 | unsigned int unk0x30; 15 | } 16 | 0x41000000: 32 47 4d 49 (0x494d4732) IMG2 17 | 00 02 00 00 (0x200) blockSize 18 | 00 00 00 00 (0x0) 19 | 03 00 00 00 (0x3) startBlock 20 | 0x41000010: fd 0b 00 00 (0xBFD) blockCount 21 | 00 00 00 00 (0x0) 22 | 00 00 00 00 (0x0) 23 | 00 00 00 00 (0x0) 24 | 0x41000020: 00 00 00 00 (0x0) 25 | 00 00 00 00 (0x0) 26 | 00 00 00 00 (0x0) 27 | 00 00 00 00 (0x0) 28 | 0x41000030: 71 5b 20 48 (0x48205B71) crc32 29 | -------------------------------------------------------------------------------- /iokit/get_devtree.objc: -------------------------------------------------------------------------------- 1 | if(CFMutableDictionaryRef dict = IOServiceMatching("IOPlatformExpertDevice")) { 2 | if (io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, dict)) { 3 | if (CFTypeRef ecid = IORegistryEntrySearchCFProperty(service, kIODeviceTreePlane, CFSTR("unique-chip-id"), kCFAllocatorDefault, kIORegistryIterateRecursively)) { 4 | NSData *data((NSData *) ecid); 5 | size_t length([data length]); 6 | uint8_t bytes[length]; 7 | [data getBytes:bytes]; 8 | char string[length * 2 + 1]; 9 | for (size_t i = 0; i != length; ++i) { 10 | sprintf(string + i * 2, "%.2X", bytes[length - i - 1]); 11 | } 12 | ExclusiveChipID = [NSString stringWithUTF8String:string]; 13 | CFRelease(ecid); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /iop/includes/iop.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * greenpois0n - hardware/s5l8920x/iop.h 4 | * (c) 2009 Chronic-Dev Team 5 | * 6 | */ 7 | 8 | // base addresses 9 | #define IOP_BASE 0x86300000 10 | #define IOP_INT0_BASE 0xBF300000 11 | #define IOP_INT1_BASE 0xBF310000 12 | #define IOP_INT2_BASE 0xBF320000 13 | #define IOP_INT3_BASE 0xBF330000 14 | 15 | // iop main registers 16 | /* todo */ 17 | 18 | // iop interrupt types 19 | #define IOPINT_IRQ_INT 0x0 20 | #define IOPINT_FIQ_INT 0x1 21 | 22 | // iop interrupt controller registers 23 | #define IOPINT_IRQ_STATUS 0x000 24 | #define IOPINT_FIQ_STATUS 0x004 25 | #define IOPINT_RAW_STATUS 0x008 26 | #define IOPINT_SELECT 0x00C 27 | #define IOPINT_ENABLE 0x010 28 | #define IOPINT_CLEAR 0x014 29 | #define IOPINT_SOFT_INT 0x018 30 | #define IOPINT_SOFT_CLEAR 0x01C 31 | #define IOPINT_PROTECTION 0x020 32 | #define IOPINT_VEC_ADDR 0xF00 33 | 34 | // iop interrupt numbers 35 | #define INT_NMI 0x2 // NAND Management Interface, should be set up as fiq 36 | #define INT_DMA 0x3 // DMA, should be set up as irq 37 | #define INT_PMU 0x5 // PMU, not set as irq/fiq, defaults to irq(?) 38 | #define INT_FMI1 0x1E // Flash Management Interface 1, should be set up as irq 39 | #define INT_FMI0 0x1F // Flash Management Interface 0, should be set up as irq 40 | -------------------------------------------------------------------------------- /lockdownd/docs/lockdownd.txt: -------------------------------------------------------------------------------- 1 | Over usbmuxd on port 62078 (Unix Domain?) 2 | 3 | [Request] 4 | 5 | 6 | 7 | 8 | Label 9 | iTunesHelper 10 | Request 11 | QueryType 12 | 13 | 14 | 15 | [Response] 16 | 17 | 18 | 19 | 20 | Request 21 | QueryType 22 | Result 23 | Success 24 | Type 25 | com.apple.mobile.lockdown 26 | 27 | 28 | 29 | [Request] 30 | 31 | Label 32 | iTunesHelper 33 | PairRecord 34 | 35 | DeviceCertificate 36 | 37 | LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNOVENDQVIyZ0F3SUJBRVJUSUZJQ0FURS0tLS0tCg== 38 | 39 | HostCertificate 40 | 41 | LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN1akNDQWFLZ0F3SUJBUlRJRklDQVRFLS0tLS0K== 42 | 43 | HostID 44 | D7......-....-....-....-........4EFE 45 | RootCertificate 46 | 47 | LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNyVENDQVpXZ0F3SUJBNUVPRitjZVFNcUovZHBFdz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= 48 | 49 | 50 | Request 51 | ValidatePair 52 | 53 | 54 | -------------------------------------------------------------------------------- /memz/docs/imagedescriptor.txt: -------------------------------------------------------------------------------- 1 | struct TempImage { 2 | void* imageData; 3 | uint32_t flag; 4 | uint32_t imageSize; 5 | uint32_t unk0x10; 6 | uint32_t unk0x14; 7 | uint32_t unk0x18; 8 | }; 9 | 10 | image_parse_header(ImageDescriptor** image, void* data, uint32_t size, uint32_t type) 11 | 12 | image_parse_footer(ImageInfo* info, int unknown) 13 | 14 | #define kShshOffsetNull = 0x20000 15 | #define kSecondHeader = 0x40000 16 | #define kHeaderValid = 0x1 17 | 18 | enum { 19 | kMainHeader = 0, 20 | kSecondHeader = 1 21 | }; HeaderType 22 | -------------------------------------------------------------------------------- /memz/docs/memz.txt: -------------------------------------------------------------------------------- 1 | #define MEMZ_MAGIC 0x4D656D7A 2 | 3 | typedef struct memz_struct { 4 | int filesize1; 5 | int filesize2; 6 | int x8 7 | int type; // Memz 8 | int data_out; 9 | int data_in; 10 | int x18 11 | } memz_struct; 12 | 13 | memz_struct* memz_create(int data_in, int size, int data_out) { 14 | memz_struct* memz = malloc(sizeof(memz_struct)); 15 | memz->filesize1 = size; 16 | memz->filesize2 = size; 17 | memz->type = MEMZ_MAGIC 18 | memz->data_out = data_out; 19 | memz->data_in = data_in; 20 | return memz; 21 | } 22 | 23 | 24 | memz_struct* memz = memz_create(0x41000000, 0xF00000, 0); 25 | sizeof(memz_struct) = 0x18; 26 | -------------------------------------------------------------------------------- /memz/docs/nor_image.txt: -------------------------------------------------------------------------------- 1 | 00000000 images_get_struct struc ; (sizeof=0x18) 2 | 00000000 dataSectionSize DCD ? 3 | 00000004 totalSize DCD ? 4 | 00000008 ImageIden DCD ? 5 | 0000000C imageTypeImg3 DCD ? 6 | 00000010 field_10 DCD ? 7 | 00000014 self_pointer DCD ? 8 | 00000018 images_get_struct ends 9 | -------------------------------------------------------------------------------- /memz/includes/imagedescriptor.txt: -------------------------------------------------------------------------------- 1 | struct TempImage { 2 | void* imageData; 3 | uint32_t flag; 4 | uint32_t imageSize; 5 | uint32_t unk0x10; 6 | uint32_t unk0x14; 7 | uint32_t unk0x18; 8 | }; 9 | 10 | image_parse_header(ImageDescriptor** image, void* data, uint32_t size, uint32_t type) 11 | 12 | image_parse_footer(ImageInfo* info, int unknown) 13 | 14 | #define kShshOffsetNull = 0x20000 15 | #define kSecondHeader = 0x40000 16 | #define kHeaderValid = 0x1 17 | 18 | enum { 19 | kMainHeader = 0, 20 | kSecondHeader = 1 21 | }; HeaderType 22 | -------------------------------------------------------------------------------- /memz/includes/memz.h: -------------------------------------------------------------------------------- 1 | #define kImageMemzContainer 0x4D656D7A 2 | 3 | typedef struct { 4 | unsigned int filesize; 5 | unsigned int fullSize; 6 | unsigned int dataSize; 7 | unsigned int type; 8 | unsigned int flags; 9 | void* data; 10 | unsigned int x18; 11 | } MemzDescriptor; 12 | 13 | //MemzDescriptor* memz_create(void* data, unsigned int size, unsigned int flags); 14 | void* memz_create(void* data, int size, int flags); 15 | -------------------------------------------------------------------------------- /memz/src/memz.c: -------------------------------------------------------------------------------- 1 | #define kMemzImageContainer 0x4D656D7A 2 | 3 | typedef struct MemzDescriptor { 4 | unsigned int fileSize; 5 | unsigned int imageSize; 6 | unsigned int dataSize; 7 | unsigned int container; 8 | unsigned int flags; 9 | unsigned char* address; 10 | unsigned int unk18; 11 | }; 12 | 13 | MemzDescriptor* memz_create(unsigned char* address, unsigned int size, unsigned int flags) { 14 | MemzDescriptor* memz = (MemzDescriptor*) malloc(sizeof(MemzDescriptor)); 15 | if(memz != NULL) { 16 | memz->fileSize = size; 17 | memz->imageSize = size; 18 | memz->type = kMemzImageContainer; 19 | memz->flags = flags; 20 | memz->address = address; 21 | } 22 | return memz; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /nand/bin/ipt3_nand_llb.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/nand/bin/ipt3_nand_llb.bin -------------------------------------------------------------------------------- /nand/docs/bdev_struct.txt: -------------------------------------------------------------------------------- 1 | typedef struct BdevDescriptor { 2 | struct BdevDescriptor nextBdev; 3 | void* unk1; 4 | unsigned int blockSize; 5 | unsigned int numOfBlocks; 6 | unsigned int unk2 7 | unsigned long long logicalSize 8 | void(*blockdev_read_hook)(); 9 | void(*default_block_read)(); 10 | void(*blockdev_write_hook)(); 11 | void(*default_block_write)(); 12 | void(*default_block_erase)(); 13 | char bdevName[0x10]; 14 | } BdevDescriptor; 15 | 16 | typedef struct GrdnPartition { 17 | unsigned int partitionType; 18 | unsigned int startBlock; 19 | unsigned int numOfBlocks; 20 | unsigned int state; 21 | } 22 | -------------------------------------------------------------------------------- /nand/docs/devicemap.txt: -------------------------------------------------------------------------------- 1 | LoadAddr: 2 | 0x41000000 3 | 4 | iBEC: 5 | 0x43000000-0x43F00000 6 | 0xF00000 7 | 8 | DeviceTree: 9 | 0x43F00000-0x44000000 10 | 0x100000 11 | 12 | Ramdisk: 13 | 0x44000000-0x46000000 14 | 0x2000000 15 | 16 | Framebuffer: 17 | 0x4FD00000-0x4FD96000 18 | 0x96000 19 | 20 | iBoot: 21 | 0x4FF00000 22 | -------------------------------------------------------------------------------- /nand/docs/nand_abstractions.txt: -------------------------------------------------------------------------------- 1 | NAND (Flash Root) 2 | WMR (Whimory) 3 | FTL (Flash_Translation_Layer? yaFTL?) 4 | FIL 5 | BUF 6 | FPart 7 | VFL (Virtual Flash Layer?) 8 | 9 | h2fmi 10 | 11 | 12 | Files: 13 | drivers 14 | flash_nand 15 | Whimory2_1 16 | Core 17 | FTL 18 | FTLInterface.c 19 | 20 | VFL 21 | VFLInterface.c 22 | VFLBuffer.c 23 | VSVFLInterface.c 24 | 25 | apple 26 | h2fmi 27 | H2fmi.c 28 | H2fmi_read.c 29 | H2fmi_write.c 30 | H2fmi_dma_iboot.c 31 | H2fmi_misc.c 32 | H2fmi_erase.c 33 | -------------------------------------------------------------------------------- /nand/docs/nand_patterns.txt: -------------------------------------------------------------------------------- 1 | 0x8124000C = 1 << (bank & 7) - nand_set_fmctrl0 2 | 0x81240014 = 0xFF - nand_send_cmd(CMD_RESET) 3 | 0x81240010 = 1 - FMCTRL1 4 | status = wait_for_done(fmi, 0x40044, 1, 1) 5 | 0x8124000C = 0 - nand_set_fmctrl0 6 | return (((status - 1) & ~(status)) >> 0x1F) ^ 1 7 | 8 | get_chip_type? 9 | 0x8124000C = (1 << (bank & 0x7)) nand_set_fmctrl0 10 | 0x81240014 = 0x90 - nand_send_cmd 11 | 0x81240018 = 0 FMANUM !!! 12 | 0x81200014 = 0 FMADDR0 = 0; 13 | 0x81240010 = 0x9 FMCTRL1 14 | status = wait_for_done(fmi, 0x40044, 0x9, 0x9) 15 | 0x40024 16 | 0x40010 FMCTRL1 17 | 0x40048 18 | 0x4000C nand_set_fmctrl0 19 | 20 | 0x812000C = 1 << (bank & 7) 21 | 0x81240014 = 0x3000 - nand_send_cmd 22 | 0x81240010 = 0xB FMCTRL1 23 | status = wait_for_done(fmi, 0x40044, 0x81240010, 0xB) 24 | 0x81240008 &= 0xFFEFFFFF 25 | 0x8124004C = 0x4040 26 | 0x81240014 = 0x70 nand_send_cmd 27 | 0x81240010 = 0x1 FMCTRL1 28 | wait_for_done(fmi, 0x40044, 0x1, 0x1) 29 | 0x81240044 = 0x20 30 | 0x81240024 = 0 31 | 0x81200034 = 0x50 32 | wait_for_done(fmi, 0x40044, 0x20, 0x20) 33 | 0x81240010 = 0 FMANUM ?? 34 | 0x81240014 = 0 nand_send_cmd 35 | 0x81240010 = 1 FMANUM ?? 36 | wait_for_done ; fmi, 0x40044, 0x1, 0x1 37 | 0x81200000 = 0xF0 38 | fmi->unk34 = 0x20001 39 | 0x81280008 = 0 40 | 0x81280014 = 0 41 | 42 | start_outter_loop1 43 | 0x81280010 = 0x128 44 | 0x8128000C = 1 45 | 46 | innterloop 47 | 0x81200004 = 0x3 48 | dma_wait_task_pending() 49 | 50 | tightloop 51 | r1 = 0x81200014 52 | end 53 | end 54 | stop_outter_loop1 55 | 56 | =second half= 57 | 0x812000C = 1 << (bank & 7) 58 | 0x81240014 = 0x3000 nand_send_cmd 59 | 0x81240010 = 0xB FMANUM ?? 60 | status = wait_for_done(fmi, 0x40044, 0x81240010, 0xB) 61 | 0x81240008 &= 0xFFEFFFFF 62 | 0x8124004C = 0x4040 63 | 0x81240014 = 0x70 nand_send_cmd 64 | 0x81240010 = 0x1 FMANUM ?? 65 | wait_for_done(fmi, 0x40044, 0x1, 0x1) 66 | 0x81240044 = 0x20 67 | 0x81240024 = 0 68 | 0x81200034 = 0x50 69 | wait_for_done(fmi, 0x40044, 0x20, 0x20) 70 | 0x81240010 = 0 FMANUM ?? 71 | 0x81240014 = 0 nand_send_cmd 72 | 0x81240010 = 1 FMANUM ?? 73 | wait_for_done ; fmi, 0x40044, 0x1, 0x1 74 | 0x81200000 = 0xF0 FMI0_CONFIG? ctrl0? 75 | fmi->unk34 = 0x20001 76 | 0x81280008 = 0 ECC? 77 | 0x81280014 = 0 ECC? 78 | 79 | 80 | 0x81280010 = 0x128 81 | 0x8128000C = 1 82 | 83 | 0x81200004 = 0x3 84 | 85 | nand_read_sector: 86 | dma_wait_task_pending() 87 | while read 0x81200014 88 | 89 | if((*0x81280010 & 8) > 0) 90 | 0x81280010 << 0x17 91 | 92 | 0x8124000C = (0x81280010 & 8) nand_set_fmctrl0 93 | -------------------------------------------------------------------------------- /nand/docs/nand_read_breakpoints.txt: -------------------------------------------------------------------------------- 1 | blockdev_read_hook(bdev, destination, source, offset, size) 2 | Breakpoint 2: at 0x4ff1baf0 3 | r0: 0x4ff35288 r1: 0x42000000 r2: 0x00000700 r3: 0x00000000 4 | r4: 0x4ff1bae9 r5: 0x4ffb1208 r6: 0x4ffb1218 r7: 0x4ffb10b0 5 | r8: 0x4ff2600c r9: 0x4ff2a960 r10: 0x00000007 r11: 0x4ffb10e0 6 | r12: 0x4ffb10a4 sp: 0x4ffb1098 lr: 0x400038a4 spsr: 0x60000173 7 | 8 | bdev_read_block(bdev, destination, blockStart, blockCount) 9 | Breakpoint 3: at 0x4ff0ec12 10 | r0: 0x4ff35288 r1: 0x42000100 r2: 0x00000004 r3: 0x00000001 11 | r4: 0x4ff0ec09 r5: 0x00000100 r6: 0x4ff35288 r7: 0x4ffb107c 12 | r8: 0x00000200 r9: 0x00000003 r10: 0x00000700 r11: 0x00000100 13 | r12: 0xd77d82c7 sp: 0x4ffb1054 lr: 0x4ff1bbe3 spsr: 0x60000173 14 | 15 | h2fmiReadBootpage(bank, page, destination 16 | Breakpoint 0: at 0x4ff0280e 17 | r0: 0x00000000 r1: 0x00000401 r2: 0x4ff35300 r3: 0x00000000 18 | r4: 0x4ff02801 r5: 0x00000000 r6: 0x00000401 r7: 0x4ffb104c 19 | r8: 0x4ff2a434 r9: 0x4ff2a960 r10: 0x00000c03 r11: 0x4ff2a440 20 | r12: 0x4ff29c10 sp: 0x4ffb1034 lr: 0x4ff0eccb spsr: 0x80000173 21 | 22 | h2fmi_read_bootpage_pio(fmi, bank, page, destination 23 | Breakpoint 0: at 0x4ff0457a 24 | r0: 0x4ff2ca50 r1: 0x00000000 r2: 0x00000401 r3: 0x4ff35300 25 | r4: 0x4ff35300 r5: 0x00000000 r6: 0x4ff2ca50 r7: 0x4ffb102c 26 | r8: 0x00000401 r9: 0x4ff2a960 r10: 0x00000000 r11: 0x4ff2a440 27 | r12: 0x4ff29c10 sp: 0x4ffb1018 lr: 0x4ff0285d spsr: 0x20000173 28 | 29 | h2fmi_pio_read_sector(fmi, destination, size, 30 | Breakpoint 0: at 0x4ff02d96 31 | r0: 0x4ff2ca50 r1: 0x4ff35700 r2: 0x00000200 r3: 0x0000000c 32 | r4: 0x4ff2ca50 r5: 0x00000002 r6: 0x4ff35700 r7: 0x4ffb1010 33 | r8: 0x00000000 r9: 0x4ff2a960 r10: 0x00000000 r11: 0x4ff2a440 34 | r12: 0x1a05a604 sp: 0x4ffb0ffc lr: 0x4ff045e7 spsr: 0x00000173 35 | 36 | 37 | 38 | 39 | 40 | 41 | break add 0x4ff1baf0 42 | break add 0x4ff0ec12 43 | break add 0x4ff0280e 44 | break add 0x4ff0457a 45 | break add 0x4ff02d96 46 | bdev read nand_firmware 0x600 0x200 0x42000000 47 | -------------------------------------------------------------------------------- /nand/docs/nand_read_protos.txt: -------------------------------------------------------------------------------- 1 | 2 | nand_read_block(void* bdev, void* destination, unsigned int blockStart, unsigned int blockSize) 3 | Breakpoint 0: at 0x4ff0ec12 4 | r0: 0x4ff35288 r1: 0x4ffb3c40 r2: 0x00000003 r3: 0x00000001 5 | r4: 0x4ff0ec09 r5: 0x00000000 r6: 0x4ff35288 r7: 0x42ffff50 6 | r8: 0x00000100 r9: 0x4ff2a960 r10: 0x00000600 r11: 0x00000000 7 | r12: 0x4ff2b944 sp: 0x42ffff28 lr: 0x4ff1bc2b spsr: 0x20000173 8 | 9 | h2fmiReadBootPage(unsigned int block, unsigned int page, void* destination) 10 | Breakpoint 0: at 0x4ff0280e 11 | r0: 0x00000000 r1: 0x00000400 r2: 0x4ff35300 r3: 0x00000000 12 | r4: 0x4ff02801 r5: 0x00000000 r6: 0x00000400 r7: 0x42ffff20 13 | r8: 0x4ff2a434 r9: 0x4ff2a960 r10: 0x00000c00 r11: 0x4ff2a440 14 | r12: 0x4ff29c10 sp: 0x42ffff08 lr: 0x4ff0eccb spsr: 0x80000173 15 | 16 | h2fmi_read_bootpage_pio(void* fmi, void* block, unsigned int page, void* destination) 17 | Breakpoint 0: at 0x4ff0457a 18 | r0: 0x4ff2ca50 r1: 0x00000000 r2: 0x00000402 r3: 0x4ff35300 19 | r4: 0x4ff35300 r5: 0x00000000 r6: 0x4ff2ca50 r7: 0x42ffff00 20 | r8: 0x00000402 r9: 0x4ff2a960 r10: 0x00000000 r11: 0x4ff2a440 21 | r12: 0x4ff29c10 sp: 0x42fffeec lr: 0x4ff0285d spsr: 0x20000173 22 | 23 | -------------------------------------------------------------------------------- /nand/docs/nand_structures.txt: -------------------------------------------------------------------------------- 1 | gFILCallbacks = 0x4FF29BA8 2 | struct { 3 | 0x4: h2fmiReadSinglePage() 4 | 0x8: h2fmiReadRawPage() 5 | 0xC: h2fmiReadSequentialPages() 6 | 0x10: h2fmiReadScatteredPages() 7 | 0x18: h2fmiReadBootpage() 8 | 0x1C: h2fmiWriteBootpage() 9 | 0x20: h2fmiErasePage() 10 | 0x44: h2fmiGetDeviceInfo(int infoType) 11 | } 12 | 13 | gFTLCallbacks = 0x4FF2A3A0 14 | struct { 15 | 0x0: FTL_Init() 16 | 0x4: FTL_Open() 17 | 0x8: FTL_Read() 18 | } 19 | 20 | gVFLCallbacks = 0x4FF2A378 21 | struct { 22 | 0x0: VFL_Init() 23 | 0x4: VFL_Open() 24 | 0x8: VFL_Read() 25 | } 26 | 27 | sizeof(BUF_Data) = 0xC 28 | struct BUF_Data { 29 | 0x0: BUFCxt->pBufferList 30 | 0x4: pBufIdx->pData 31 | 0x8: 0x10000000 32 | 0xC: pBufIdx->pSpare 33 | } 34 | 35 | , 36 | 37 | 38 | WMR->FIL->VFL->FTL 39 | -------------------------------------------------------------------------------- /nand/includes/nand.h: -------------------------------------------------------------------------------- 1 | #define FMI0_CTRL0(value) *((volatile unsigned int*)0x8124000C) = (volatile unsigned int*)value) 2 | #define FMI0_CTRL1(value) *((volatile unsigned int*)0x81240010) = (volatile unsigned int*)value) 3 | #define FMI0_CMD(value) *((volatile unsigned int*)0x81240014) = (volatile unsigned int*)value) 4 | #define FMI0_UNK2(value) *((volatile unsigned int*)0x81240024) = (volatile unsigned int*)value) 5 | #define FMI0_STATUS(value) *((volatile unsigned int*)0x81240044) = (volatile unsigned int*)value) 6 | #define FMI0_SET_FIFO0(value) *((volatile unsigned int*)0x81240048) = (volatile unsigned int*)value) 7 | #define FMI0_GET_FIFO0 *((volatile unsigned int*)0x81240048) 8 | 9 | #define FMI_CMD_READID 0x90 10 | 11 | typedef struct NandController { 12 | void* base; 13 | } 14 | -------------------------------------------------------------------------------- /nand/src/nand.c: -------------------------------------------------------------------------------- 1 | #include "nand.h" 2 | 3 | int nand_reset_bank(void* fmi, unsigned int bank) { 4 | int ret = 0; 5 | int status = 0; 6 | 7 | FMI0_CTRL0(1 << (bank & 7); 8 | FMI0_CMD(0xFF); 9 | FMI0_CTRL1(1); 10 | 11 | status = wait_for_done(fmi, 0x40044, 1, 1); 12 | usleep(20000); 13 | FMI0_CTRL0(0); 14 | 15 | // return (((status - 1) & ~(status)) >> 0x1F) ^ 1; 16 | ret = status - 1; 17 | ret &= ~status; 18 | ret >>= 0x1F; 19 | ret ^= 1; 20 | return ret; 21 | } 22 | 23 | int wait_for_done(void* fmi, void* reg, unsigned int mask, unsigned int val) { 24 | unsigned long long start = timer_get_microseconds(); 25 | while(1) { 26 | if((GET_REG(fmi->base + reg) & mask) == val) break; 27 | if(timer_has_elapsed(fmi, bank, start)) return -1; 28 | } 29 | return 0; 30 | } 31 | 32 | int nand_read_chip_id(void* fmi, int bank, int* chip_id) { 33 | FMI0_CTRL(1 << (bank & 0x7); 34 | FMI0_CMD(FMI_CMD_READID) 35 | fmi->base + 0x40018 = 0x0; 36 | fmi->base + 0x40020 = 0x0; 37 | FMI0_CTRL1(0x9); 38 | 39 | int id; 40 | int ret = 0; 41 | int status = wait_for_done(fmi, fmi->base + 0x40044, 0x9, 0x9); 42 | if(status != 0) { 43 | nand_pio_read_sector(fmi, 5, &id); 44 | /* 45 | LDRB R3, [R5,#3] 46 | LSLS R2, R3, #0x18 47 | LDRB R3, [R5,#2] 48 | LSLS R3, R3, #0x10 49 | ORRS R2, R3 50 | LDRB R3, [R5] 51 | ORRS R2, R3 52 | LDRB R3, [R5,#1] 53 | LSLS R3, R3, #8 54 | ORRS R3, R2 55 | MOVS R2, #1 56 | STR R3, [R6] 57 | */ 58 | 59 | } else { 60 | ret = 0; 61 | } 62 | 63 | FMI0_CTRL0(0); 64 | return ret; 65 | } 66 | 67 | int nand_pio_read_sector(void* fmi, unsigned int num, void* var) { 68 | int count = 0; 69 | fmi->base + 0x240024 = 0; 70 | while(count != num) { 71 | FMI0_CTRL1(0x50); 72 | var[count] = FMI0_GET_FIFO0; 73 | count++; 74 | FMI0_CTRL1(0); 75 | } 76 | } 77 | 78 | int nand_read_block(void* fmi, unsigned int bank, unsigned int page) { 79 | 80 | } 81 | 82 | int nand_read_bootpage(void* fmi, unsigned int bank, void* destination, unsigned int* size) { 83 | unsigned int pagesRead = 0; 84 | unsigned int remaining = *size; 85 | while(remaining > 0x5FF) { 86 | 87 | } 88 | 89 | nand_close_gate(fmi); 90 | *size = (((pagesRead << 1) + pagesRead) << 9) + 0xFFFFF400 91 | if(*size != 0) return 0; 92 | return -1; 93 | } 94 | -------------------------------------------------------------------------------- /nvram/includes/nvram.h: -------------------------------------------------------------------------------- 1 | typedef struct NvramVar { 2 | struct NvramVar* prev; 3 | struct NvramVar* next; 4 | unsigned char* string; 5 | unsigned int integer; 6 | unsigned int save; 7 | char name[0x40]; 8 | } NvramVar; 9 | 10 | -------------------------------------------------------------------------------- /rsa/certParser.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/rsa/certParser.idb -------------------------------------------------------------------------------- /sys/includes/heap.h: -------------------------------------------------------------------------------- 1 | #define WILDERNESS 1 2 | #define UNKNOWN 2 3 | #define PREV_IN_USE 4 4 | 5 | typedef struct chunk_header { 6 | unsigned int prev_size; 7 | unsigned int size; 8 | void* bck; 9 | void* fwd; 10 | } 11 | -------------------------------------------------------------------------------- /sys/includes/lock.h: -------------------------------------------------------------------------------- 1 | void enter_critical_section(); 2 | void exit_critical_section(); 3 | void enable_irq(); 4 | void disable_irq(); 5 | 6 | -------------------------------------------------------------------------------- /sys/src/free.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned int* gHeapRemaining; 4 | 5 | struct chunk_header* get_next_chunk(struct chunk_header* chunk) { 6 | unsigned int chunk_size = chunk->size << 3; 7 | return ((struct chunk_header*)(chunk + chunk_size)); 8 | } 9 | 10 | struct chunk_header* get_prev_chunk(struct chunk_header* chunk) { 11 | unsigned int chunk_size = (chunk->prev_size >> 2) << 3; 12 | return ((struct chunk_header*)(chunk - chunk_size)); 13 | } 14 | 15 | void free(void* ptr) { 16 | if(ptr == NULL) { 17 | return; 18 | } 19 | enter_critical_section(); 20 | struct chunk_header* current = (struct chunk_header*)(ptr - 8); 21 | *gHeapRemaining += (current->size << 3); 22 | 23 | struct chunk_header* next = get_next_chunk(current); 24 | struct chunk_header* prev = get_prev_chunk(current); 25 | if(current != next && current != prev 26 | && current == get_prev_chunk(next) 27 | && current == get_next_chunk(prev) 28 | && current & 1)) panic(NULL, NULL); 29 | 30 | exit_critical_section(); 31 | } 32 | -------------------------------------------------------------------------------- /sys/src/lock.c: -------------------------------------------------------------------------------- 1 | void enter_critical_section() { 2 | TaskDescriptor* current_task = *gTaskRunning; 3 | if(current_task->irq_disable_count < 0 4 | && current_task->irq_disable_count > 1000) { 5 | panic("enter_critical_section", "ASSERT FAILED at (%s:%s:%d): %s\n", 6 | "sys/lock.c", "enter_critical_section", LINE_NUMBER, 7 | "current_task->irq_disable_count >= 0"); 8 | } 9 | 10 | current_task->irq_disable_count++; 11 | if(current_task->irq_disable_count == 1) { 12 | disable_irq(); 13 | } 14 | } 15 | 16 | void exit_critical_section() { 17 | TaskDescriptor* current_task = *gTaskRunning; 18 | if(current_task->irq_disable_count < 0 19 | && current_task->cirq_disable_count > 1000) { 20 | panic("exit_critical_section", "ASSERT FAILED at (%s:%s:%d): %s\n", 21 | "sys/lock.c", "exit_critical_section", LINE_NUMBER, 22 | "current_task->irq_disable_count > 0"); 23 | } 24 | 25 | current_task->irq_disable_count--; 26 | if(current_task->irq_disable_count == 0) { 27 | enable_irq(); 28 | } 29 | } 30 | 31 | void enable_irq() { 32 | __asm__("mrs r0, cpsr"); 33 | __asm__("bic r1, r0, #0x80"); 34 | __asm__("msr cpsr_c, r1"); 35 | __asm__("and r0, r0, #0x80"); 36 | } 37 | 38 | void disable_irq() { 39 | __asm__("mrs r0, cpsr"); 40 | __asm__("orr r1, r0, #0x80"); 41 | __asm__("msr cpsr_c, R1"); 42 | __asm__("and r0, r0, #0x80"); 43 | } 44 | 45 | -------------------------------------------------------------------------------- /sys/src/malloc.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static void* gHeapHeader; 4 | 5 | void* malloc(size_t size) { 6 | void* candidate = NULL; 7 | enter_critical_section(); 8 | 9 | unsigned size = get_min_alloc(size); 10 | void* zone = get_zone(size); 11 | chunk_header* candidate = gZoneHeader + (zone * 4); 12 | 13 | NEXT_ZONE: 14 | if(zone > 0x1F) { 15 | *gZoneHeader -= *(unsigned int)(0x4)) << 3 16 | exit_critical_section(); 17 | return NULL; 18 | } 19 | 20 | NEXT_CANDIDATE: 21 | if(candidate == NULL) { 22 | zone++; 23 | candidate += 4; 24 | goto NEXT_ZONE; 25 | } 26 | 27 | if(size > (candidate->fwd << 3)) { 28 | candidate = candidate->prev; 29 | goto NEXT_CANDIDATE; 30 | } 31 | 32 | chunk_header* next = candidate->next; 33 | chunk_header* prev = candidate->prev; 34 | *next = prev; 35 | if(prev == NULL) { 36 | prev->next = candidate->next; 37 | } 38 | 39 | assign_chunk(candidate, size); 40 | *gZoneHeader -= candidate->fwd << 3; 41 | exit_critical_section(); 42 | 43 | return candidate + 8; 44 | } 45 | -------------------------------------------------------------------------------- /task/docs/oneliners: -------------------------------------------------------------------------------- 1 | # iRecovery hex to binary conversion 2 | sub irec_hex2bin(in,out) 3 | perl -e 'while(<>){($a,$b)=split(/:\s/);foreach(split(/\s+/,$b)){print(pack("H*",$_))}}' NOR_Dump.txt >NOR_Backup.bin 4 | 5 | # iRecovery error scanner 6 | sub irec_missing_line(in) 7 | perl -e '$prev=0;while(<>){($a,$b)=split(/:\s/);if(hex($a)!=$prev+16){print("Error $a\n")}$prev=hex($a);}' NOR_Dump.txt 8 | 9 | # Check for iRecovery missing nybble 10 | sub irec_missing_byte(in) 11 | perl -e 'while(<>){($a,$b)=split(/:\s/);foreach(split(/\s+/,$b)){print("ERROR: $a\n")unless(/^.{2}$/)}}' NOR_Dump.txt 12 | 13 | # Hexdump hex to binary conversion 14 | sub hex2bin(in,out) 15 | perl -e 'while(<>){($addr,$data1,$data2,$ascii)=split(/\s\s/);foreach(split(/\s/,$data1)){print(pack("H*",$_))}foreach(split(/\s/,$data2)){print(pack("H*",$_))}}' in.txt >out.bin 16 | 17 | # Tag creation routine 18 | sub genimg3tags(size,out) { 19 | system("perl -e '$i=512;foreach(AAAA..FFFF){exit if($i==0);print(\"$_\".pack(\"I*\",16).\"\".pack(\"I*\",4).\"\".pack(\"H*\",\"FFFFFFFF\"));$i--;};' >tags.bin"); 20 | } 21 | -------------------------------------------------------------------------------- /task/docs/poweroff_task.txt: -------------------------------------------------------------------------------- 1 | poweroff task: 2 | 0x0: 6B 73 61 74 - 0x7461736B "task" // task_start_magic 3 | 0x4: 2C 19 FB 4F - 0x4FFB192C // something in upper stack 4 | 0x8: 8C DB F4 4F - 0x4FF4DB8C // something in lower stack 5 | 0xC: 20 93 F2 4F - 0x4FF29320 // some kind of linked list 6 | 0x10: 20 93 F2 4F - 0x4FF29320 // looks like the other half of a linked list 7 | 0x14: 01 00 00 00 - 1 // is critical section? 8 | 0x18: 02 00 00 00 - 2 // is irq/fiq enabled? 9 | 0x1C: 04 C1 F2 4F - 0x4FF2C104 10 | 0x20: 88 92 F2 4F - 0x4FF29288 11 | 0x24: 00 00 00 00 - 0 12 | 0x28: E8 18 FB 4F - 0x4FFB18E8 13 | 0x2C: 00 00 00 00 14 | 0x30: 00 00 00 00 15 | 0x34: 00 00 00 00 16 | 0x38: 00 00 00 00 17 | 0x3C: E0 18 FB 4F 18 | 0x40: A9 91 F1 4F - 0x4FF191A9 //LR or PC? 19 | 0x44: 00 00 00 00 20 | 0x48: 00 00 00 00 21 | 0x4C: 4C 98 7A 4A 22 | 0x50: 03 00 00 00 23 | 0x54: 10 27 00 00 24 | 0x58: 00 00 00 00 25 | 0x5C: 3D 8F F1 4F - 0x4FF18F3D 26 | 0x60: 80 16 FB 4F 27 | 0x64: E4 16 FB 4F - 0x4FFB16E4 //previous_task? 28 | 0x68: E4 16 FB 4F - 0x4FFB16E4 //next_task? 29 | 0x6C: 00 00 00 00 - 0 30 | 0x70: E1 0E F0 4F - 0x4FF00EE1 //task_handler 31 | 0x74: 00 00 00 00 - 0 //task_priority 32 | 0x78: 20 17 FB 4F - 0x4FFB1720 //task_memory 33 | 0x7C: 00 02 00 00 - 0x200 //task_memory_size 34 | 0x80: 70 6F 77 65 72 6F 66 66 00 00 00 00 00 00 00 00 - "poweroff" //task_name 35 | 0x90: 32 6B 73 74 - 0x74736B32 "tsk2" //task_stop_magic 36 | -------------------------------------------------------------------------------- /task/docs/task_struct.txt: -------------------------------------------------------------------------------- 1 | struct task_struct { 2 | int start_magic = "task"; //0x4 3 | void* prev_task; //0x8 4 | void* next_task; //0xC 5 | void* unknown_zero; //0x10 6 | void* unknown_zero; //0x14 7 | void* unknown_one; //0x18 8 | void* unk; //0x1C 9 | void* unk; //0x20 10 | void* unk; //0x24 11 | void* unknown_zero; //0x28 12 | void* unk; //0x2C 13 | void* unk; //0x30 14 | void* unk; //0x34 15 | void* unk; //0x38 16 | void* unk; //0x3C 17 | void* unk; //0x40 18 | void* unk; //0x44 19 | void* unk; //0x48 20 | void* unk; //0x4C 21 | void* unk; //0x50 22 | void* unk; //0x54 23 | void* unk; //0x58 24 | void* unk; //0x5C 25 | void* unk; //0x60 26 | void* unk; //0x64 27 | void* unk; //0x68 28 | void* unk; //0x6C 29 | void* task_handler; //0x70 30 | void* task_priority; //0x74 31 | void* task_memory; //0x78 32 | int task_memory_size; //0x7C 33 | char task_name[0x10]; //0x80 34 | int stop_magic = "tsk2"; //0x90 35 | 36 | } 37 | -------------------------------------------------------------------------------- /task/includes/iboot.h: -------------------------------------------------------------------------------- 1 | enum Boolean { 2 | FALSE = 0, 3 | TRUE = 1 4 | }; 5 | 6 | enum OnOff { 7 | OFF = 0, 8 | ON = 1 9 | }; 10 | 11 | struct LinkedList { 12 | void* prev; 13 | void* next; 14 | }; 15 | 16 | struct TaskRegisterState { 17 | unsigned int r4; 18 | unsigned int r5; 19 | unsigned int r6; 20 | unsigned int r7; 21 | unsigned int r8; 22 | unsigned int r9; 23 | unsigned int r10; 24 | unsigned int r11; 25 | unsigned int sp; 26 | unsigned int lr; 27 | }; 28 | 29 | enum TaskState { 30 | TASK_READY = 1, 31 | TASK_RUNNING = 2, 32 | TASK_SLEEPING = 4, 33 | TASK_STOPPED = 5 34 | }; 35 | 36 | struct Event { 37 | struct LinkedList list; 38 | unsigned int deadline_a; 39 | unsigned int deadline_b; 40 | unsigned int interval_a; 41 | unsigned int interval_b; 42 | void* handler; 43 | void* opaque; 44 | }; 45 | 46 | struct TaskDescriptor { 47 | unsigned int identifier1; 48 | struct LinkedList taskList; 49 | struct LinkedList runqueueList; 50 | enum TaskState state; 51 | unsigned int criticalSectionNestCount; 52 | struct TaskRegisterState savedRegisters; 53 | struct Event sleepEvent; 54 | struct LinkedList linked_list_3; 55 | unsigned int exitState; 56 | void* taskRoutine; 57 | void* unknown_passed_value; 58 | void* storage; 59 | unsigned int storageSize; 60 | char taskName[16]; 61 | unsigned int identifier2; 62 | }; 63 | -------------------------------------------------------------------------------- /task/includes/task.h: -------------------------------------------------------------------------------- 1 | struct LinkedList { 2 | void* prev; 3 | void* next; 4 | }; 5 | 6 | struct TaskRegisterState { 7 | unsigned int r4; 8 | unsigned int r5; 9 | unsigned int r6; 10 | unsigned int r7; 11 | unsigned int r8; 12 | unsigned int r9; 13 | unsigned int r10; 14 | unsigned int r11; 15 | unsigned int sp; 16 | unsigned int lr; 17 | }; 18 | 19 | enum TaskState { 20 | TASK_READY = 1, 21 | TASK_RUNNING = 2, 22 | TASK_SLEEPING = 4, 23 | TASK_STOPPED = 5 24 | }; 25 | 26 | struct Event { 27 | struct LinkedList list; 28 | unsigned int deadline_a; 29 | unsigned int deadline_b; 30 | unsigned int interval_a; 31 | unsigned int interval_b; 32 | void* handler; 33 | void* opaque; 34 | }; 35 | 36 | struct TaskDescriptor { 37 | unsigned int taskBegin; 38 | struct TaskDescriptor* prevTask; 39 | struct TaskDescriptor* nextTask; 40 | struct TaskDescriptor* prevJob; 41 | struct TaskDescriptor* nextJob; 42 | enum TaskState taskState; 43 | unsigned int criticalSectionNestCount; 44 | struct TaskRegisterState taskRegisters; 45 | struct Event sleepEvent; 46 | struct LinkedList linked_list_3; 47 | unsigned int exitState; 48 | void* taskHandler; 49 | void* taskArg; 50 | void* taskStack; 51 | unsigned int stackSize; 52 | char taskName[0x10]; 53 | unsigned int taskEnd; 54 | }; 55 | -------------------------------------------------------------------------------- /task/src/check_addr.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | $prev = 0; 4 | $count = 0; 5 | @file = <>; 6 | $size = $#file; 7 | foreach(@file) { 8 | $count++; 9 | $line = $_; 10 | next if($_ eq "/\r\n/"); 11 | my ($addr, $bytes) = split(/:\s*/); 12 | if(hex($addr) != $prev + 16 && $prev != 0) { 13 | $current = $prev+16; 14 | while($current < hex($addr)) { 15 | printf("Missing 0x%08x\n", $current); 16 | $current += 16; 17 | } 18 | } 19 | 20 | $prev = hex($addr); 21 | } 22 | 23 | 24 | # find good lines 25 | # log bad lines 26 | -------------------------------------------------------------------------------- /task/src/find_good.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | foreach(<>) { 4 | $error = 0; 5 | next if($_ eq "\r\n/"); 6 | my ($addr, $bytes) = split(/:\s*/); 7 | if($addr !~ /^.{10}$/) { 8 | if($addr ne "\r\n") { 9 | #print("Invalid Address: $addr\n"); 10 | next; 11 | } 12 | $error = 1; 13 | } 14 | 15 | my $count = 0; 16 | foreach( split(/\s/, $bytes) ) { 17 | $count++; 18 | if($count > 16) { 19 | #print("Too Many Bytes: $addr\n"); 20 | $error = 1; 21 | last; 22 | } 23 | 24 | if($_ !~ /^.{2}$/) { 25 | #print("Missing Nyble: $addr\n"); 26 | $error = 1; 27 | next; 28 | } 29 | } 30 | 31 | if($error == 0 && $count == 16) { 32 | print "$addr: $bytes"; 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /task/src/hash.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | %dict = {}; 4 | while(<>) { 5 | ($addr, $bytes) = split(/:\s*/); 6 | if($dict{$addr} eq "") { 7 | $dict{$addr} = $bytes; 8 | } 9 | } 10 | 11 | $start = "0x4ff2e000"; 12 | $stop = "0x4fff7ff0"; 13 | $hexstart = hex($start); 14 | $hexstop = hex($stop); 15 | $current = $hexstart; 16 | while($current < $hexstop) { 17 | $address = sprintf("0x%08x", $current); 18 | if($dict{$address} ne "") { 19 | print "$address: $dict{$address}"; 20 | } 21 | $current += 16; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /task/src/search.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | $found = 0; 4 | open($FD, "good.txt"); 5 | foreach(<$FD>) { 6 | next if($_ eq "\r\n/"); 7 | my ($addr, $bytes) = split(/:\s*/); 8 | if($addr eq $ARGV[0]) { 9 | print "$addr: $bytes"; 10 | $found = 1; 11 | last; 12 | } 13 | } 14 | close($FD); 15 | -------------------------------------------------------------------------------- /task/src/task_exit.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int task_exit(int state) { 4 | TaskDescriptor* current_task = *gTaskRunning; 5 | current_task.exitState = state; 6 | 7 | current_task.state = TASK_STOPPED; 8 | 9 | task_remove(current_task.linked_list_3); 10 | *task_stack--; 11 | 12 | task_yield(); 13 | panic("task_exit", "task_exit: should not be here\n")' 14 | } 15 | 16 | int task_remove(LinkedList* list) { 17 | //PUSH {R4-R7,LR} 18 | //ADD R7, SP, #0xC 19 | //MOV R6, R0 20 | //BL enter_critical_section 21 | enter_critical_section(); 22 | 23 | //LDR R3, [R6,#LinkedList.next] 24 | //MOVS R5, #0 25 | int cnt = 0; 26 | 27 | //SUB.W R0, R3, #0xC 28 | TaskDescriptor* task = (void*) *gTaskList->next 29 | 30 | //LDR R3, [R3,#LinkedList.next] 31 | //SUB.W R4, R3, #0xC 32 | //B loc_4FF19428 33 | 34 | //ADD.W R3, R0, #0xC 35 | //CMP R3, R6 36 | //BNE loc_4FF19406 37 | while(task->taskList.next != *gTaskList) { 38 | //LDR R2, [R0,#TaskDescriptor.runqueueList.next] 39 | next = task->next; 40 | 41 | //LDR R3, [R0,#TaskDescriptor.runqueueList.prev] 42 | prev = task->prev; 43 | 44 | //ADDS R5, #1 45 | cnt++; 46 | 47 | //STR R3, [R2] 48 | task->next = prev; 49 | 50 | //LDR R3, [R0,#TaskDescriptor.runqueueList.prev] 51 | prev = task->prev; 52 | 53 | //STR R2, [R3,#LinkedList.next] 54 | task->prev->next = task->next; 55 | 56 | //MOVS R3, #0 57 | //STR R3, [R0,#TaskDescriptor.runqueueList.next] 58 | task->next = NULL; 59 | 60 | //STR R3, [R0,#TaskDescriptor.runqueueList.prev] 61 | task->prev = NULL; 62 | 63 | //ADDS R3, #TASK_READY 64 | //STR R3, [R0,#TaskDescriptor.state] 65 | task->state = TASK_READY; 66 | 67 | //BL task_add_queue 68 | task_add_queue(...); 69 | 70 | //LDR R3, [R4,#TaskDescriptor.runqueueList.next] 71 | //MOV R0, R4 72 | //SUB.W R4, R3, #0xC 73 | task = task->next; 74 | } 75 | 76 | //BL exit_critical_section 77 | exit_critical_section(); 78 | 79 | //MOV R0, R5 80 | return cnt; 81 | 82 | } 83 | -------------------------------------------------------------------------------- /uart/includes/uart.h: -------------------------------------------------------------------------------- 1 | 2 | typedef enum { 3 | kUartModePoll = 0 4 | } uart_mode; 5 | 6 | typedef struct uart_settings { 7 | unsigned int ureg; 8 | unsigned int baud; 9 | unsigned int sample_rate; 10 | unsigned int flow_control; 11 | unsigned int fifo; 12 | unsigned int mode; 13 | unsigned int clock; 14 | } uart_settings; 15 | 16 | typedef struct uart_registers { 17 | unsigned int ULCON; 18 | unsigned int UCON; 19 | unsigned int UFCON; 20 | unsigned int UMCON; 21 | 22 | unsigned int UTRSTAT; 23 | unsigned int UERSTAT; 24 | unsigned int UFSTAT; 25 | unsigned int UMSTAT; 26 | 27 | unsigned int UTXH; 28 | unsigned int URXH; 29 | unsigned int UBAUD; 30 | unsigned int UINTP; 31 | } uart_registers; 32 | 33 | int uart_write(int ureg, const char *buffer, unsigned int length); 34 | int uart_read(int ureg, char *buffer, unsigned int length, unsigned int timeout); 35 | 36 | -------------------------------------------------------------------------------- /usb/usb_controller_ops.h: -------------------------------------------------------------------------------- 1 | struct usb_controller_ops { 2 | void* start; // 0x0 3 | void* stop; // 0x4 4 | void* set_address; // 0x8 5 | void* stall_endpoint; // 0xC 6 | void* reset_endpoint_data_toggle // 0x10 7 | void* is_endpoint_stalled // 0x14 8 | void* do_endpoint_io; // 0x18 9 | void* activate_endpoint; // 0x1C 10 | void* deactivate_endpoint; // 0x20 11 | void* abort_endpoint; // 0x24 12 | void* do_test_mode; // 0x28 13 | void* get_connection_speed // 0x2C 14 | }; 15 | -------------------------------------------------------------------------------- /usb/usb_structs.h: -------------------------------------------------------------------------------- 1 | struct USBEPRegisters { 2 | unsigned int control; 3 | unsigned int field_4; 4 | unsigned int interrupt; 5 | unsigned int field_8; 6 | unsigned int transferSize; 7 | void* dmaAddress; 8 | unsigned int field_18; 9 | unsigned int field_1C 10 | }; 11 | 12 | struct USBDeviceDescriptor { 13 | unsigned char bLength; 14 | unsigned char bDescriptorType; 15 | unsigned short bcdUSB; 16 | unsigned char bDeviceClass; 17 | unsigned char bDeviceSubClass; 18 | unsigned char bDeviceProtocol; 19 | unsigned char bMaxPacketSize; 20 | unsigned short idVendor; 21 | unsigned short idProduct; 22 | unsigned short bcdDevice; 23 | unsigned char iManufacturer; 24 | unsigned char iProduct; 25 | unsigned char iSerialNumber; 26 | unsigned char bNumConfigurations; 27 | }; 28 | 29 | struct USBConfigurationDescriptor { 30 | unsigned char bLength; 31 | unsigned char bDescriptorType; 32 | unsigned short wTotalLength; 33 | unsigned char bNumInterfaces; 34 | unsigned char bConfigurationValue; 35 | unsigned char iConfiguration; 36 | unsigned char bmAttributes; 37 | unsigned char bMaxPower; 38 | }; 39 | 40 | struct USBInterfaceDescriptor { 41 | unsigned char bLength; 42 | unsigned char bDescriptorType; 43 | unsigned char bInterfaceNumber; 44 | unsigned char bAlternateSetting; 45 | unsigned char bNumEndpoints; 46 | unsigned char bInterfaceClass; 47 | unsigned char bInterfaceSubClass; 48 | unsigned char bInterfaceProtocol; 49 | unsigned char iInterface; 50 | }; 51 | 52 | struct USBEndpointDescriptor { 53 | unsigned char bLength; 54 | unsigned char bDescriptorType; 55 | unsigned char bEndpointAddress; 56 | unsigned char bmAttributes; 57 | unsigned short wMaxPacketSize; 58 | unsigned char bInterval; 59 | }; 60 | 61 | struct USBDeviceQualifierDescriptor { 62 | unsigned char bLength; 63 | unsigned char bDescriptorType; 64 | unsigned short bcdUSB; 65 | unsigned char bDeviceClass; 66 | unsigned char bDeviceSubClass; 67 | unsigned char bDeviceProtocol; 68 | unsigned char bMaxPacketSize; 69 | unsigned char bNumConfigurations; 70 | unsigned char bReserved; 71 | }; 72 | 73 | struct USBSetupPacket { 74 | unsigned char bmRequestType; 75 | unsigned char bRequest; 76 | unsigned short wValue; 77 | unsigned short wIndex; 78 | unsigned short wLength; 79 | }; 80 | 81 | struct RingBuffer { 82 | char* writePtr; 83 | char* readPtr; 84 | unsigned int count 85 | unsigned int size; 86 | char* bufferStart; 87 | char* bufferEnd; 88 | }; 89 | 90 | struct usb_controller_ops { 91 | void* start; // 0x0 92 | void* stop; // 0x4 93 | void* set_address; // 0x8 94 | void* stall_endpoint; // 0xC 95 | void* reset_endpoint_data_toggle; // 0x10 96 | void* is_endpoint_stalled; // 0x14 97 | void* do_endpoint_io; // 0x18 98 | void* activate_endpoint; // 0x1C 99 | void* deactivate_endpoint; // 0x20 100 | void* abort_endpoint; // 0x24 101 | void* do_test_mode; // 0x28 102 | void* get_connection_speed; // 0x2C 103 | }; 104 | 105 | struct usb_request { 106 | unsigned int unk0x0; 107 | void* data; 108 | unsigned int unk0x8; 109 | unsigned int unk0xC; 110 | unsigned int unk0x10; 111 | void* callback; 112 | }; 113 | -------------------------------------------------------------------------------- /vic/vic_table.txt: -------------------------------------------------------------------------------- 1 | f5 4d f0 4f 2 | ed 2a f1 4f 3 | 39 50 f0 4f 4 | 00 91 f2 4f 5 | 39 50 f0 4f 6 | 70 90 f2 4f 7 | f5 1a f1 4f 8 | f5 1a f1 4f 9 | f5 1a f1 4f 10 | f5 1a f1 4f 11 | f5 1a f1 4f 12 | f5 1a f1 4f 13 | a9 39 f0 4f 14 | b0 cb f2 4f 15 | a9 39 f0 4f 16 | b0 cb f2 4f 17 | a9 39 f0 4f 18 | 50 ca f2 4f 19 | 20 | -------------------------------------------------------------------------------- /wdt/includes/wdt.h: -------------------------------------------------------------------------------- 1 | #define WDT_CONTROL 0xBF100210 2 | #define WDT_UNKNOWN 0xBF100214 3 | #define WDT_UNKNOWN 0xBF10021C 4 | 5 | #define WDT_ENABLE 0x80000000 6 | #define WDT_UNKNOWN 0 7 | #define WDT_UNKNOWN 1 8 | #define WDT_UNKNOWN 4 9 | -------------------------------------------------------------------------------- /wdt/src/wdt_reboot.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void wdt_reboot() { 4 | *(0xBF10021C) = 0; 5 | *(0xBF100214) = 1; 6 | 7 | SETREG(WDT_CONTROL, WDT_ENABLE); 8 | 9 | *(0xBF10021C) = 4; 10 | *(0xBF100210) = 0; 11 | } 12 | -------------------------------------------------------------------------------- /wifi/bcm_firmware_4.216.83.0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/wifi/bcm_firmware_4.216.83.0.bin -------------------------------------------------------------------------------- /wifi/bcm_firmware_4.216.83.0.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/wifi/bcm_firmware_4.216.83.0.idb -------------------------------------------------------------------------------- /wifi/bcm_firmware_4.216.83.0.tstdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/wifi/bcm_firmware_4.216.83.0.tstdb -------------------------------------------------------------------------------- /xnu/functions/strncat.txt: -------------------------------------------------------------------------------- 1 | bsd/vfs/kpi_vfs.c: strncat(xfromname, fcnp->cn_nameptr, fcnp->cn_namelen); 2 | bsd/vfs/kpi_vfs.c: strncat(xtoname, tcnp->cn_nameptr, tcnp->cn_namelen); 3 | bsd/man/man2/sigaction.2:.Fn strncat , 4 | config/System6.0.exports:_strncat 5 | config/Libkern.exports:_strncat 6 | iokit/Kernel/IOStringFuncs.c:char *strncat(char *s1, const char *s2, unsigned long n); 7 | iokit/Kernel/IOStringFuncs.c:strncat(char *s1, const char *s2, unsigned long n) 8 | osfmk/device/subrs.c: * Appends src to string dst of size siz (unlike strncat, siz is the 9 | osfmk/libsa/string.h:extern char *strncat(char *, const char *, size_t); 10 | security/mac_audit.c: strncat(sanitized, ": ", MAC_AUDIT_DATA_LIMIT - plen + 2); 11 | security/mac_audit.c: strncat(sanitized, text, MAC_AUDIT_DATA_LIMIT - plen); 12 | -------------------------------------------------------------------------------- /xnu/functions/strtol.txt: -------------------------------------------------------------------------------- 1 | bsd/dev/dtrace/blist.c: size = strtol(ptr, NULL, 0); 2 | bsd/libkern/strtol.c: * strol.c - The functions strtol() & strtoul() are exported as public API 3 | bsd/libkern/strtol.c: * Created based on BSD4.4's strtol.c & strtoul.c. 4 | bsd/libkern/strtol.c:strtol(nptr, endptr, base) 5 | bsd/libkern/strtol.c: * See strtol for comments as to the logic used. 6 | bsd/libkern/libkern.h:extern long strtol(const char*, char **, int); 7 | bsd/man/man9/style.9: num = strtol(optarg, &ep, 10); 8 | bsd/nfs/nfs4_subs.c: nvap->nva_uid = strtol(s, NULL, 10); 9 | bsd/nfs/nfs4_subs.c: nvap->nva_gid = strtol(s, NULL, 10); 10 | config/System6.0.exports:_strtol 11 | config/Libkern.exports:_strtol 12 | iokit/bsddev/IOKitBSDInit.cpp: partition = strtol( look + 1, 0, 0 ); 13 | iokit/bsddev/IOKitBSDInit.cpp: unit = strtol( look + 1, &comp, 16 ); 14 | iokit/bsddev/IOKitBSDInit.cpp: lun = strtol( comp + 1, 0, 16 ); 15 | iokit/Kernel/IONVRAM.cpp: tmpNumber = OSNumber::withNumber(strtol((const char *)propData, 0, 0), 32); 16 | iokit/Kernel/IOStringFuncs.c: * strol.c - The functions strtol() & strtoul() are exported as public API 17 | iokit/Kernel/IOStringFuncs.c: * Created based on BSD4.4's strtol.c & strtoul.c. 18 | iokit/Kernel/IOStringFuncs.c:long strtol(const char *nptr, char **endptr, int base); 19 | iokit/Kernel/IOStringFuncs.c:strtol(const char *nptr, char **endptr, int base) 20 | iokit/Kernel/IOStringFuncs.c: * See strtol for comments as to the logic used. 21 | libkern/c++/OSUnserializeXML.cpp: object->idref = strtol(values[i], NULL, 0); 22 | libkern/c++/OSUnserializeXML.cpp: object->idref = strtol(values[i], NULL, 0); 23 | libkern/c++/OSUnserializeXML.y: object->idref = strtol(values[i], NULL, 0); 24 | libkern/c++/OSUnserializeXML.y: object->idref = strtol(values[i], NULL, 0); 25 | osfmk/libsa/stdlib.h: * Added strtol and strtoul prototypes. 26 | osfmk/libsa/stdlib.h:extern long int strtol (const char *, char **, int); 27 | pexpert/ppc/pe_kprintf.c:extern long strtol(const char *, char **, int); 28 | pexpert/ppc/pe_kprintf.c: gPESerialBaud = strtol(baud, NULL, 0); 29 | pexpert/ppc/pe_kprintf.c: gPESerialBaud = strtol(baud, NULL, 0); 30 | -------------------------------------------------------------------------------- /xnu/functions/strtoul.txt: -------------------------------------------------------------------------------- 1 | bsd/netinet/in.c: u_int32_t l = strtoul(p, 0, 0); 2 | bsd/kern/netboot.c: u_long l = strtoul(p, 0, 0); 3 | bsd/vfs/vfs_lookup.c: id = strtoul(path, &str, 10); 4 | bsd/libkern/strtol.c: * strol.c - The functions strtol() & strtoul() are exported as public API 5 | bsd/libkern/strtol.c: * Created based on BSD4.4's strtol.c & strtoul.c. 6 | bsd/libkern/strtol.c:strtoul(nptr, endptr, base) 7 | bsd/libkern/libkern.h:extern u_long strtoul(const char *, char **, int); 8 | bsd/hfs/hfs_link.c: *firstlink = strtoul((char*)&dataptr->attrData[0], NULL, 10); 9 | bsd/hfs/hfs_vfsops.c: linkref = strtoul(&nameptr[HFS_INODE_PREFIX_LEN], NULL, 10); 10 | bsd/hfs/hfs_vfsops.c: linkref = strtoul(&nameptr[HFS_DIRINODE_PREFIX_LEN], NULL, 10); 11 | bsd/hfs/hfs_readwrite.c: cnid = strtoul(bufptr, NULL, 10); 12 | config/System6.0.exports:_strtoul 13 | config/Libkern.exports:_strtoul 14 | iokit/Kernel/IOStringFuncs.c: * strol.c - The functions strtol() & strtoul() are exported as public API 15 | iokit/Kernel/IOStringFuncs.c: * Created based on BSD4.4's strtol.c & strtoul.c. 16 | iokit/Kernel/IOStringFuncs.c:unsigned long strtoul(const char *nptr, char **endptr, int base); 17 | iokit/Kernel/IOStringFuncs.c:strtoul(const char *nptr, char **endptr, int base) 18 | libkern/c++/OSNumber.cpp: return init((unsigned long long)strtoul(newValue, NULL, 0), newNumberOfBits); 19 | libkern/c++/OSUnserializeXML.cpp: object->size = strtoul(values[i], NULL, 0); 20 | libkern/c++/OSUnserializeXML.y: object->size = strtoul(values[i], NULL, 0); 21 | osfmk/console/panic_ui/setupdialog.c: width = strtoul(argv[++next], &ptr, 0); 22 | osfmk/console/panic_ui/setupdialog.c: width = strtoul(argv[++next], &ptr, 0); 23 | osfmk/libsa/stdlib.h: * Added strtol and strtoul prototypes. 24 | osfmk/libsa/stdlib.h:extern unsigned long int strtoul (const char *, char **, int); 25 | -------------------------------------------------------------------------------- /xnu/kexts/AppleAMC_r2.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleAMC_r2.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleARMIISAudio.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleARMIISAudio.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleARMPL192VIC.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleARMPL192VIC.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleARMPlatform.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleARMPlatform.idb -------------------------------------------------------------------------------- /xnu/kexts/AppleARMPlatform.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleARMPlatform.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleBCMWLAN.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleBCMWLAN.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleBaseband.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleBaseband.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleBluetooth.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleBluetooth.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleCD3282Mikey.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleCD3282Mikey.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleCDMA.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleCDMA.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleCS42L58Audio.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleCS42L58Audio.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleD1755PMU.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleD1755PMU.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleDiskImagesFileBackingStore.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleDiskImagesFileBackingStore.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleDiskImagesKernelBacked.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleDiskImagesKernelBacked.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleDiskImagesRAMBackingStore.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleDiskImagesRAMBackingStore.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleDiskImagesReadWriteDiskImage.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleDiskImagesReadWriteDiskImage.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleDiskImagesUDIFDiskImage.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleDiskImagesUDIFDiskImage.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleEmbeddedAccelerometer.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleEmbeddedAccelerometer.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleEmbeddedIOP.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleEmbeddedIOP.idb -------------------------------------------------------------------------------- /xnu/kexts/AppleEmbeddedIOP.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleEmbeddedIOP.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleEmbeddedLightSensor.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleEmbeddedLightSensor.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleEmbeddedUSBAudio.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleEmbeddedUSBAudio.idb -------------------------------------------------------------------------------- /xnu/kexts/AppleEmbeddedUSBAudio.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleEmbeddedUSBAudio.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleFSCompressionTypeZlib.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleFSCompressionTypeZlib.idb -------------------------------------------------------------------------------- /xnu/kexts/AppleFSCompressionTypeZlib.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleFSCompressionTypeZlib.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleH2PDART.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleH2PDART.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleImage3NORAccess.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleImage3NORAccess.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleJPEGDriver.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleJPEGDriver.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleKernelStorage.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleKernelStorage.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleLM48557Amp.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleLM48557Amp.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleM2DisplayDrivers.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleM2DisplayDrivers.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleM2ScalerCSC.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleM2ScalerCSC.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleM68Buttons.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleM68Buttons.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleMobileFileIntegrity.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleMobileFileIntegrity.idb -------------------------------------------------------------------------------- /xnu/kexts/AppleMobileFileIntegrity.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleMobileFileIntegrity.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleMultitouchSPI.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleMultitouchSPI.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleNANDFTL.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleNANDFTL.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleNANDFirmware.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleNANDFirmware.idb -------------------------------------------------------------------------------- /xnu/kexts/AppleNANDFirmware.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleNANDFirmware.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleOnboardSerial.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleOnboardSerial.kext -------------------------------------------------------------------------------- /xnu/kexts/ApplePinotLCD.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/ApplePinotLCD.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleReliableSerialLayer.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleReliableSerialLayer.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleS5L8720X.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleS5L8720X.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleS5L8720XUSBPhy.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleS5L8720XUSBPhy.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleS5L8900X.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleS5L8900X.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleS5L8900XCrypto.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleS5L8900XCrypto.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleS5L8900XSerial.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleS5L8900XSerial.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleS5L8920X.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleS5L8920X.idb -------------------------------------------------------------------------------- /xnu/kexts/AppleS5L8920X.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleS5L8920X.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleS5L8920XARM7M.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleS5L8920XARM7M.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleS5L8920XIOPFMI.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleS5L8920XIOPFMI.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleS5L8920XIOPSDIO.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleS5L8920XIOPSDIO.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleS5L8920XSHA1.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleS5L8920XSHA1.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleSerialMultiplexer.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleSerialMultiplexer.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleSynopsysOTG2.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleSynopsysOTG2.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleTetheredDevice.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleTetheredDevice.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleUSBComposite.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleUSBComposite.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleUSBDeviceMux.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleUSBDeviceMux.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleUSBHub.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleUSBHub.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleUSBMergeNub.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleUSBMergeNub.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleUSBMike.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleUSBMike.kext -------------------------------------------------------------------------------- /xnu/kexts/AppleVXD375.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/AppleVXD375.kext -------------------------------------------------------------------------------- /xnu/kexts/BasebandSPI.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/BasebandSPI.kext -------------------------------------------------------------------------------- /xnu/kexts/CHUDKernLib.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/CHUDKernLib.kext -------------------------------------------------------------------------------- /xnu/kexts/CHUDProf.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/CHUDProf.kext -------------------------------------------------------------------------------- /xnu/kexts/H2H264VideoEncoder.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/H2H264VideoEncoder.kext -------------------------------------------------------------------------------- /xnu/kexts/IO80211Family.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IO80211Family.kext -------------------------------------------------------------------------------- /xnu/kexts/IOAccessoryManager.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOAccessoryManager.kext -------------------------------------------------------------------------------- /xnu/kexts/IOAudio2Family.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOAudio2Family.kext -------------------------------------------------------------------------------- /xnu/kexts/IOCameraFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOCameraFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IOCryptoAcceleratorFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOCryptoAcceleratorFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IOFlashNVRAM.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOFlashNVRAM.idb -------------------------------------------------------------------------------- /xnu/kexts/IOFlashNVRAM.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOFlashNVRAM.kext -------------------------------------------------------------------------------- /xnu/kexts/IOFlashStorage.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOFlashStorage.kext -------------------------------------------------------------------------------- /xnu/kexts/IOHDIXController.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOHDIXController.kext -------------------------------------------------------------------------------- /xnu/kexts/IOHIDFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOHIDFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IOMobileGraphicsFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOMobileGraphicsFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IONetworkingFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IONetworkingFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IOSDIOFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOSDIOFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IOSerialFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOSerialFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IOStorageFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOStorageFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IOStreamFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOStreamFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IOSurface.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOSurface.kext -------------------------------------------------------------------------------- /xnu/kexts/IOTextEncryptionFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOTextEncryptionFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IOUSBDeviceFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOUSBDeviceFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IOUSBFamily.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOUSBFamily.kext -------------------------------------------------------------------------------- /xnu/kexts/IOUSBHIDDriver.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOUSBHIDDriver.kext -------------------------------------------------------------------------------- /xnu/kexts/IOUSBUserClient.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOUSBUserClient.idb -------------------------------------------------------------------------------- /xnu/kexts/IOUSBUserClient.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOUSBUserClient.kext -------------------------------------------------------------------------------- /xnu/kexts/IOUserEthernet.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/IOUserEthernet.kext -------------------------------------------------------------------------------- /xnu/kexts/com.apple.IMGSGX535.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/com.apple.IMGSGX535.kext -------------------------------------------------------------------------------- /xnu/kexts/com.apple.nke.lttp.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/com.apple.nke.lttp.kext -------------------------------------------------------------------------------- /xnu/kexts/com.apple.nke.ppp.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/com.apple.nke.ppp.idb -------------------------------------------------------------------------------- /xnu/kexts/com.apple.nke.ppp.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/com.apple.nke.ppp.kext -------------------------------------------------------------------------------- /xnu/kexts/com.apple.nke.pptp.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/com.apple.nke.pptp.kext -------------------------------------------------------------------------------- /xnu/kexts/iPhone_Kexts.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/iPhone_Kexts.zip -------------------------------------------------------------------------------- /xnu/kexts/security.mac_seatbelt.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/security.mac_seatbelt.idb -------------------------------------------------------------------------------- /xnu/kexts/security.mac_seatbelt.kext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/kexts/security.mac_seatbelt.kext -------------------------------------------------------------------------------- /xnu/source/bsd/hfs/malloc-to-free.txt: -------------------------------------------------------------------------------- 1 | attrlist 2 | 2 3 | 2 4 | 5 | catalog 6 | 28 7 | 28 8 | 9 | chash 10 | 1 11 | 1 12 | 13 | cnode 14 | 1 15 | 1 16 | 17 | encodings 18 | 1 19 | 2 20 | 21 | hotfiles 22 | 7 23 | 8 24 | 25 | link 26 | 3 27 | 4 28 | 29 | search 30 | 1 31 | 1 32 | 33 | vfsops 34 | 7 35 | 8 36 | 37 | vfsutils 38 | 3 39 | 2 40 | 41 | vnops 42 | 3 43 | 1 44 | 45 | xattr 46 | 14 47 | 13 48 | 49 | rangelist 50 | 2 51 | 4 52 | 53 | btree 54 | 0 55 | 0 56 | -------------------------------------------------------------------------------- /xnu/source/bsd/kern/bsd_init.txt: -------------------------------------------------------------------------------- 1 | while( TRUE) { 2 | int err; 3 | 4 | //bsd_init_kprintf("calling setconf\n"); 5 | /* 6 | * calls into IOKit can generate networking registrations 7 | * which needs to be under network funnel. Right thing to do 8 | * here is to drop the funnel alltogether and regrab it afterwards 9 | */ 10 | err = IOFindBSDRoot(rootdevice, sizeof(rootdevice), &rootdev, &flags); 11 | if( err) { 12 | printf("setconf: IOFindBSDRoot returned an error (%d);" 13 | "setting rootdevice to 'sd0a'.\n", err); /* XXX DEBUG TEMP */ 14 | rootdev = makedev( 6, 0 ); 15 | strlcpy(rootdevice, "sd0a", sizeof(rootdevice)); 16 | flags = 0; 17 | } 18 | 19 | bsd_init_kprintf("vfs_mountroot\n"); 20 | if (0 == (err = vfs_mountroot())) 21 | break; 22 | 23 | rootdevice[0] = '\0'; 24 | printf("cannot mount root, errno = %d\n", err); 25 | boothowto |= RB_ASKNAME; 26 | } 27 | 28 | IOSecureBSDRoot(rootdevice); 29 | 30 | context.vc_thread = current_thread(); 31 | context.vc_ucred = kernproc->p_ucred; 32 | mountlist.tqh_first->mnt_flag |= MNT_ROOTFS; 33 | 34 | bsd_init_kprintf("calling VFS_ROOT\n"); 35 | 36 | /* Get the vnode for '/'. Set fdp->fd_fd.fd_cdir to reference it. */ 37 | if (VFS_ROOT(mountlist.tqh_first, &rootvnode, &context)) 38 | panic("bsd_init: cannot find root vnode: %s", PE_boot_args()); 39 | rootvnode->v_flag |= VROOT; 40 | (void)vnode_ref(rootvnode); 41 | (void)vnode_put(rootvnode); 42 | filedesc0.fd_cdir = rootvnode; 43 | -------------------------------------------------------------------------------- /xnu/source/osfmk/lintian.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJailbreak/iBootRE/9d718ab804f9d8d51c63bc983efe7fe3a095eb47/xnu/source/osfmk/lintian.log -------------------------------------------------------------------------------- /xnu/syscalls/__ATPgetreq.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__ATPgetreq, ATPgetreq, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__ATPgetrsp.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__ATPgetrsp, ATPgetrsp, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__ATPsndreq.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__ATPsndreq, ATPsndreq, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__ATPsndrsp.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__ATPsndrsp, ATPsndrsp, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__ATgetmsg.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__ATgetmsg, ATgetmsg, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__ATputmsg.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__ATputmsg, ATputmsg, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__ATsocket.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__ATsocket, ATsocket, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__accept.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__accept, accept, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__accept_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__accept_nocancel, accept_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__access.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__access, access, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__access_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__access_extended, access_extended, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__acct.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__acct, acct, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__add_profil.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__add_profil, add_profil, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__adjtime.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__adjtime, adjtime, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__aio_cancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__aio_cancel, aio_cancel, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__aio_error.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__aio_error, aio_error, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__aio_fsync.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__aio_fsync, aio_fsync, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__aio_read.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__aio_read, aio_read, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__aio_return.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__aio_return, aio_return, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__aio_suspend.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__aio_suspend, aio_suspend, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__aio_suspend_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__aio_suspend_nocancel, aio_suspend_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__aio_write.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__aio_write, aio_write, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__audit.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__audit, audit, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__audit_session_join.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__audit_session_join, audit_session_join, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__audit_session_self.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__audit_session_self, audit_session_self, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__auditctl.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__auditctl, auditctl, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__auditon.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__auditon, auditon, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__bind.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__bind, bind, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__bsdthread_create.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__bsdthread_create, bsdthread_create, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__bsdthread_register.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 28 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__bsdthread_register, bsdthread_register, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__bsdthread_terminate.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__bsdthread_terminate, bsdthread_terminate, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__chdir.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__chdir, chdir, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__chflags.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__chflags, chflags, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__chmod.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__chmod, chmod, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__chmod_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__chmod_extended, chmod_extended, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__chown.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__chown, chown, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__chroot.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__chroot, chroot, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__chud.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 48 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__chud, chud, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__close.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__close, close, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__close_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__close_nocancel, close_nocancel, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__connect.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__connect, connect, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__connect_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__connect_nocancel, connect_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__copyfile.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__copyfile, copyfile, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__csops.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__csops, csops, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__delete.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__delete, delete, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__disable_threadsignal.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__disable_threadsignal, __disable_threadsignal, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__dup.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__dup, dup, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__dup2.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__dup2, dup2, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__exchangedata.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__exchangedata, exchangedata, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__execve.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__execve, execve, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__exit.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__exit, exit, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fchdir.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fchdir, fchdir, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fchflags.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fchflags, fchflags, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fchmod.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fchmod, fchmod, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fchmod_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fchmod_extended, fchmod_extended, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fchown.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fchown, fchown, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fcntl.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fcntl, fcntl, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fcntl_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fcntl_nocancel, fcntl_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fdatasync.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fdatasync, fdatasync, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__ffsctl.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__ffsctl, ffsctl, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fgetattrlist.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fgetattrlist, fgetattrlist, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fgetxattr.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fgetxattr, fgetxattr, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fhopen.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fhopen, fhopen, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__flistxattr.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__flistxattr, flistxattr, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__flock.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__flock, flock, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fpathconf.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fpathconf, fpathconf, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fremovexattr.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fremovexattr, fremovexattr, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fsctl.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fsctl, fsctl, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fsetattrlist.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fsetattrlist, fsetattrlist, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fsetxattr.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fsetxattr, fsetxattr, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fsgetpath.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fsgetpath, fsgetpath, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fstat.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fstat, fstat, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fstat64.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fstat64, fstat64, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fstat64_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fstat64_extended, fstat64_extended, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fstat_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fstat_extended, fstat_extended, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fstatfs.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fstatfs, fstatfs, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fstatfs64.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fstatfs64, fstatfs64, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fstatv.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fstatv, fstatv, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fsync.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fsync, fsync, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__fsync_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__fsync_nocancel, fsync_nocancel, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__ftruncate.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__ftruncate, ftruncate, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__futimes.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__futimes, futimes, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getattrlist.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getattrlist, getattrlist, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getaudit.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getaudit, getaudit, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getaudit_addr.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getaudit_addr, getaudit_addr, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getauid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getauid, getauid, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getdirentries.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getdirentries, getdirentries, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getdirentries64.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getdirentries64, getdirentries64, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getdirentriesattr.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 32 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getdirentriesattr, getdirentriesattr, 8) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getdtablesize.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getdtablesize, getdtablesize, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getegid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getegid, getegid, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__geteuid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__geteuid, geteuid, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getfh.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getfh, getfh, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getfsstat.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getfsstat, getfsstat, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getfsstat64.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getfsstat64, getfsstat64, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getgid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getgid, getgid, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getgroups.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getgroups, getgroups, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__gethostuuid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__gethostuuid, gethostuuid, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getitimer.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getitimer, getitimer, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getlcid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getlcid, getlcid, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getlogin.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getlogin, getlogin, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getpeername.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getpeername, getpeername, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getpgid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getpgid, getpgid, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getpgrp.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getpgrp, getpgrp, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getppid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getppid, getppid, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getpriority.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getpriority, getpriority, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getrlimit.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getrlimit, getrlimit, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getrusage.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getrusage, getrusage, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getsgroups.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getsgroups, getsgroups, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getsid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getsid, getsid, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getsockname.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getsockname, getsockname, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getsockopt.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getsockopt, getsockopt, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__gettid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__gettid, gettid, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__gettimeofday.s: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* Copyright 1998 Apple Computer, Inc. */ 29 | 30 | #include "SYS.h" 31 | 32 | #if defined(__ppc__) || defined(__ppc64__) 33 | 34 | /* This syscall is special cased: the timeval is returned in r3/r4. 35 | * Note also that the "seconds" field of the timeval is a long, so 36 | * it's size is mode dependent. 37 | */ 38 | MI_ENTRY_POINT(___gettimeofday) 39 | mr r12,r3 // save ptr to timeval 40 | SYSCALL_NONAME(gettimeofday,0) 41 | stg r3,0(r12) // "stw" in 32-bit mode, "std" in 64-bit mode 42 | stw r4,GPR_BYTES(r12) 43 | li r3,0 44 | blr 45 | 46 | #elif defined(__i386__) 47 | 48 | /* 49 | * This syscall is special cased: the timeval is returned in eax/edx. 50 | */ 51 | LABEL(___gettimeofday) 52 | UNIX_SYSCALL_INT_NONAME(gettimeofday,0) 53 | mov 4(%esp),%ecx 54 | mov %eax,(%ecx) 55 | mov %edx,4(%ecx) 56 | xor %eax,%eax 57 | ret 58 | 59 | #elif defined(__x86_64__) 60 | 61 | /* 62 | * This syscall is special cased: the timeval is returned in rax:rdx. 63 | */ 64 | LABEL(___gettimeofday) 65 | UNIX_SYSCALL_NONAME(gettimeofday,0) 66 | movq %rax, (%rdi) 67 | movl %edx, 8(%rdi) 68 | xorl %eax, %eax 69 | ret 70 | 71 | #else 72 | #error Unsupported architecture 73 | #endif 74 | -------------------------------------------------------------------------------- /xnu/syscalls/__getuid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getuid, getuid, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getwgroups.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getwgroups, getwgroups, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__getxattr.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__getxattr, getxattr, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__identitysvc.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__identitysvc, identitysvc, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__initgroups.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__initgroups, initgroups, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__ioctl.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__ioctl, ioctl, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__iopolicysys.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__iopolicysys, iopolicysys, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__issetugid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__issetugid, issetugid, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__kdebug_trace.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__kdebug_trace, kdebug_trace, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__kevent.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__kevent, kevent, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__kevent64.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 28 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__kevent64, kevent64, 7) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__kill.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__kill, kill, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__kqueue.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__kqueue, kqueue, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__lchown.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__lchown, lchown, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__link.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__link, link, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__lio_listio.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__lio_listio, lio_listio, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__listen.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__listen, listen, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__listxattr.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__listxattr, listxattr, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__lseek.s: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | 29 | #include "SYS.h" 30 | 31 | #if defined(__ppc__) || defined(__ppc64__) || defined(__x86_64__) 32 | 33 | __SYSCALL(__lseek, lseek, 3) 34 | 35 | #elif defined(__i386__) 36 | 37 | __SYSCALL_INT(__lseek, lseek, 3) 38 | 39 | #else 40 | #error Unsupported architecture 41 | #endif 42 | -------------------------------------------------------------------------------- /xnu/syscalls/__lstat.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__lstat, lstat, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__lstat64.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__lstat64, lstat64, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__lstat64_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__lstat64_extended, lstat64_extended, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__lstat_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__lstat_extended, lstat_extended, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__lstatv.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__lstatv, lstatv, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_execve.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_execve, __mac_execve, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_get_fd.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_get_fd, __mac_get_fd, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_get_file.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_get_file, __mac_get_file, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_get_lcid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_get_lcid, __mac_get_lcid, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_get_lctx.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_get_lctx, __mac_get_lctx, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_get_link.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_get_link, __mac_get_link, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_get_mount.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_get_mount, __mac_get_mount, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_get_pid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_get_pid, __mac_get_pid, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_get_proc.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_get_proc, __mac_get_proc, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_getfsstat.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_getfsstat, __mac_getfsstat, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_mount.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_mount, __mac_mount, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_set_fd.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_set_fd, __mac_set_fd, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_set_file.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_set_file, __mac_set_file, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_set_lctx.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_set_lctx, __mac_set_lctx, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_set_link.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_set_link, __mac_set_link, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_set_proc.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_set_proc, __mac_set_proc, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mac_syscall.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mac_syscall, __mac_syscall, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__madvise.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__madvise, madvise, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mincore.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mincore, mincore, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__minherit.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__minherit, minherit, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mkcomplex.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mkcomplex, mkcomplex, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mkdir.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mkdir, mkdir, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mkdir_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mkdir_extended, mkdir_extended, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mkfifo.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mkfifo, mkfifo, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mkfifo_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mkfifo_extended, mkfifo_extended, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mknod.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mknod, mknod, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mlock.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mlock, mlock, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mlockall.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mlockall, mlockall, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mmap.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 28 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mmap, mmap, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__modwatch.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__modwatch, modwatch, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mount.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mount, mount, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__mprotect.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__mprotect, mprotect, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__msgctl.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__msgctl, msgctl, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__msgget.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__msgget, msgget, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__msgrcv.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__msgrcv, msgrcv, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__msgrcv_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__msgrcv_nocancel, msgrcv_nocancel, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__msgsnd.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__msgsnd, msgsnd, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__msgsnd_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__msgsnd_nocancel, msgsnd_nocancel, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__msgsys.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__msgsys, msgsys, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__msync.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__msync, msync, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__msync_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__msync_nocancel, msync_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__munlock.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__munlock, munlock, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__munlockall.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__munlockall, munlockall, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__munmap.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__munmap, munmap, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__nfsclnt.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__nfsclnt, nfsclnt, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__nfssvc.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__nfssvc, nfssvc, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__old_semwait_signal.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__old_semwait_signal, __old_semwait_signal, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__old_semwait_signal_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__old_semwait_signal_nocancel, __old_semwait_signal_nocancel, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__open.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__open, open, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__open_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__open_extended, open_extended, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__open_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__open_nocancel, open_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__pathconf.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__pathconf, pathconf, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__pipe.s: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. */ 29 | 30 | #include "SYS.h" 31 | 32 | #if defined(__ppc__) || defined(__ppc64__) 33 | 34 | MI_ENTRY_POINT(___pipe) 35 | mr r12,r3 // save fildes across syscall 36 | SYSCALL_NONAME(pipe, 0) 37 | stw r3,0(r12) 38 | stw r4,4(r12) 39 | li r3,0 40 | blr 41 | 42 | #elif defined(__i386__) 43 | 44 | PSEUDO_INT(__pipe, pipe, 0) 45 | movl 4(%esp),%ecx 46 | movl %eax,(%ecx) 47 | movl %edx,4(%ecx) 48 | xorl %eax,%eax 49 | ret 50 | 51 | #elif defined(__x86_64__) 52 | 53 | PSEUDO(__pipe, pipe, 0) 54 | movl %eax, (%rdi) 55 | movl %edx, 4(%rdi) 56 | xorl %eax, %eax 57 | ret 58 | 59 | #else 60 | #error Unsupported architecture 61 | #endif 62 | -------------------------------------------------------------------------------- /xnu/syscalls/__poll.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__poll, poll, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__poll_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__poll_nocancel, poll_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__posix_spawn.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__posix_spawn, posix_spawn, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__pread.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__pread, pread, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__pread_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__pread_nocancel, pread_nocancel, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__proc_info.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 28 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__proc_info, proc_info, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__profil.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__profil, profil, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_cvbroad.s: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. */ 29 | 30 | #include "SYS.h" 31 | 32 | #define __SYSCALL_32BIT_ARG_BYTES 36 33 | 34 | #if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) 35 | 36 | __SYSCALL(__psynch_cvbroad, psynch_cvbroad, 8) 37 | 38 | #else 39 | #error Unsupported architecture 40 | #endif 41 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_cvsignal.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 32 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__psynch_cvsignal, psynch_cvsignal, 8) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_cvwait.s: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. */ 29 | 30 | #include "SYS.h" 31 | 32 | #define __SYSCALL_32BIT_ARG_BYTES 40 33 | 34 | #if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) 35 | 36 | __SYSCALL(__psynch_cvwait, psynch_cvwait, 8) 37 | 38 | #else 39 | #error Unsupported architecture 40 | #endif 41 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_mutexdrop.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__psynch_mutexdrop, psynch_mutexdrop, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_mutexwait.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__psynch_mutexwait, psynch_mutexwait, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_rw_downgrade.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__psynch_rw_downgrade, psynch_rw_downgrade, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_rw_longrdlock.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__psynch_rw_longrdlock, psynch_rw_longrdlock, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_rw_rdlock.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__psynch_rw_rdlock, psynch_rw_rdlock, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_rw_unlock.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__psynch_rw_unlock, psynch_rw_unlock, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_rw_unlock2.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__psynch_rw_unlock2, psynch_rw_unlock2, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_rw_upgrade.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__psynch_rw_upgrade, psynch_rw_upgrade, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_rw_wrlock.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__psynch_rw_wrlock, psynch_rw_wrlock, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__psynch_rw_yieldwrlock.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__psynch_rw_yieldwrlock, psynch_rw_yieldwrlock, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__pthread_canceled.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__pthread_canceled, __pthread_canceled, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__pthread_chdir.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__pthread_chdir, __pthread_chdir, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__pthread_fchdir.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__pthread_fchdir, __pthread_fchdir, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__pthread_kill.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__pthread_kill, __pthread_kill, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__pthread_markcancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__pthread_markcancel, __pthread_markcancel, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__pthread_sigmask.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__pthread_sigmask, __pthread_sigmask, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__ptrace.s: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. */ 29 | 30 | #include "SYS.h" 31 | 32 | #if defined(__ppc__) || defined(__ppc64__) 33 | 34 | MI_ENTRY_POINT(___ptrace) 35 | li r7,0 36 | MI_GET_ADDRESS(r8,_errno) 37 | stw r7,0(r8) 38 | SYSCALL_NONAME(ptrace, 4) 39 | blr 40 | 41 | #elif defined(__i386__) 42 | 43 | .globl _errno 44 | 45 | LEAF(___ptrace, 0) 46 | xorl %eax,%eax 47 | REG_TO_EXTERN(%eax,_errno) 48 | UNIX_SYSCALL_NONAME(ptrace, 4) 49 | ret 50 | 51 | #elif defined(__x86_64__) 52 | 53 | .globl _errno 54 | 55 | LEAF(___ptrace, 0) 56 | xorq %rax,%rax 57 | REG_TO_EXTERN(%rax,_errno) 58 | UNIX_SYSCALL_NONAME(ptrace, 4) 59 | ret 60 | 61 | #else 62 | #error Unsupported architecture 63 | #endif 64 | -------------------------------------------------------------------------------- /xnu/syscalls/__pwrite.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__pwrite, pwrite, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__pwrite_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__pwrite_nocancel, pwrite_nocancel, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__quota.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__quota, quota, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__quotactl.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__quotactl, quotactl, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__read.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__read, read, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__read_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__read_nocancel, read_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__readlink.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__readlink, readlink, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__readv.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__readv, readv, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__readv_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__readv_nocancel, readv_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__reboot.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__reboot, reboot, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__recvfrom.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__recvfrom, recvfrom, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__recvfrom_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__recvfrom_nocancel, recvfrom_nocancel, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__recvmsg.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__recvmsg, recvmsg, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__recvmsg_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__recvmsg_nocancel, recvmsg_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__removexattr.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__removexattr, removexattr, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__rename.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__rename, rename, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__revoke.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__revoke, revoke, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__rmdir.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__rmdir, rmdir, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__searchfs.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__searchfs, searchfs, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__select.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__select, select, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__select_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__select_nocancel, select_nocancel, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sem_close.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sem_close, sem_close, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sem_destroy.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sem_destroy, sem_destroy, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sem_getvalue.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sem_getvalue, sem_getvalue, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sem_init.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sem_init, sem_init, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sem_open.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sem_open, sem_open, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sem_post.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sem_post, sem_post, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sem_trywait.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sem_trywait, sem_trywait, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sem_unlink.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sem_unlink, sem_unlink, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sem_wait.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sem_wait, sem_wait, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sem_wait_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sem_wait_nocancel, sem_wait_nocancel, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__semctl.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__semctl, semctl, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__semget.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__semget, semget, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__semop.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__semop, semop, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__semsys.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__semsys, semsys, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__semwait_signal.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 28 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__semwait_signal, __semwait_signal, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__semwait_signal_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 28 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__semwait_signal_nocancel, __semwait_signal_nocancel, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sendfile.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 28 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sendfile, sendfile, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sendmsg.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sendmsg, sendmsg, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sendmsg_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sendmsg_nocancel, sendmsg_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sendto.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sendto, sendto, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sendto_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sendto_nocancel, sendto_nocancel, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setattrlist.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setattrlist, setattrlist, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setaudit.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setaudit, setaudit, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setaudit_addr.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setaudit_addr, setaudit_addr, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setauid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setauid, setauid, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setegid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setegid, setegid, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__seteuid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__seteuid, seteuid, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setgid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setgid, setgid, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setgroups.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setgroups, setgroups, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setitimer.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setitimer, setitimer, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setlcid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setlcid, setlcid, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setlogin.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setlogin, setlogin, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setpgid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setpgid, setpgid, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setpriority.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setpriority, setpriority, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setprivexec.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setprivexec, setprivexec, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setquota.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setquota, setquota, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setregid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setregid, setregid, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setreuid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setreuid, setreuid, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setrlimit.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setrlimit, setrlimit, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setsgroups.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setsgroups, setsgroups, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setsid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setsid, setsid, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setsockopt.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 20 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setsockopt, setsockopt, 5) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__settid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__settid, settid, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__settid_with_pid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__settid_with_pid, settid_with_pid, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__settimeofday.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__settimeofday, settimeofday, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setuid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setuid, setuid, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setwgroups.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setwgroups, setwgroups, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__setxattr.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__setxattr, setxattr, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__shared_region_check_np.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__shared_region_check_np, shared_region_check_np, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__shared_region_map_np.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__shared_region_map_np, shared_region_map_np, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__shm_open.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__shm_open, shm_open, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__shm_unlink.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__shm_unlink, shm_unlink, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__shmat.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__shmat, shmat, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__shmctl.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__shmctl, shmctl, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__shmdt.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__shmdt, shmdt, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__shmget.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__shmget, shmget, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__shmsys.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__shmsys, shmsys, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__shutdown.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__shutdown, shutdown, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sigaction.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sigaction, sigaction, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sigaltstack.s: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | 29 | #include "SYS.h" 30 | 31 | #if defined(__ppc__) || defined(__ppc64__) || defined(__x86_64__) 32 | 33 | __SYSCALL(__sigaltstack, sigaltstack, 3) 34 | 35 | #elif defined(__i386__) 36 | 37 | __SYSCALL_INT(__sigaltstack, sigaltstack, 3) 38 | 39 | #else 40 | #error Unsupported architecture 41 | #endif 42 | -------------------------------------------------------------------------------- /xnu/syscalls/__sigpending.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sigpending, sigpending, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sigprocmask.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sigprocmask, sigprocmask, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sigreturn.s: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | 29 | #include "SYS.h" 30 | 31 | #if defined(__ppc__) || defined(__ppc64__) || defined(__x86_64__) 32 | 33 | __SYSCALL(__sigreturn, sigreturn, 2) 34 | 35 | #elif defined(__i386__) 36 | 37 | __SYSCALL_INT(__sigreturn, sigreturn, 2) 38 | 39 | #else 40 | #error Unsupported architecture 41 | #endif 42 | -------------------------------------------------------------------------------- /xnu/syscalls/__sigsuspend.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sigsuspend, sigsuspend, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sigsuspend_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sigsuspend_nocancel, sigsuspend_nocancel, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sigwait.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sigwait, __sigwait, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sigwait_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sigwait_nocancel, __sigwait_nocancel, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__socket.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__socket, socket, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__socketpair.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__socketpair, socketpair, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__stack_snapshot.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__stack_snapshot, stack_snapshot, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__stat.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__stat, stat, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__stat64.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__stat64, stat64, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__stat64_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__stat64_extended, stat64_extended, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__stat_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__stat_extended, stat_extended, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__statfs.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__statfs, statfs, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__statfs64.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__statfs64, statfs64, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__statv.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__statv, statv, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__swapon.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__swapon, swapon, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__symlink.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__symlink, symlink, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__sync.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sync, sync, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__syscall.s: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. */ 29 | 30 | #include "SYS.h" 31 | 32 | #if defined(__ppc__) || defined(__ppc64__) 33 | 34 | __SYSCALL(__syscall, syscall, 7) 35 | 36 | #elif defined(__i386__) 37 | 38 | LEAF(___syscall, 0) 39 | popl %ecx // ret addr 40 | popl %eax // syscall number 41 | pushl %ecx 42 | UNIX_SYSCALL_TRAP 43 | movl (%esp),%edx // add one element to stack so 44 | pushl %ecx // caller "pop" will work 45 | jnb 2f 46 | BRANCH_EXTERN(cerror) 47 | 2: 48 | END(___syscall) 49 | 50 | #elif defined(__x86_64__) 51 | 52 | // For x86-64, the kernel slides the argument list for us. 53 | // The number of arguments here is variable, but our macros ignore 54 | // that value anyway. 55 | __SYSCALL(__syscall, syscall, 0); 56 | 57 | #else 58 | #error Unsupported architecture 59 | #endif 60 | -------------------------------------------------------------------------------- /xnu/syscalls/__sysctl.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 24 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__sysctl, __sysctl, 6) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__thread_selfid.s: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2007 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | 29 | #include "SYS.h" 30 | 31 | #if defined(__x86_64__) 32 | 33 | __SYSCALL(__thread_selfid, thread_selfid, 1) 34 | 35 | #elif defined(__i386__) 36 | 37 | __SYSCALL_INT(__thread_selfid, thread_selfid, 1) 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /xnu/syscalls/__truncate.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__truncate, truncate, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__umask.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__umask, umask, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__umask_extended.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__umask_extended, umask_extended, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__undelete.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__undelete, undelete, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__unlink.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 4 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__unlink, unlink, 1) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__unmount.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__unmount, unmount, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__utimes.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__utimes, utimes, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__vm_pressure_monitor.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__vm_pressure_monitor, vm_pressure_monitor, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__wait4.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__wait4, wait4, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__wait4_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__wait4_nocancel, wait4_nocancel, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__waitevent.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__waitevent, waitevent, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__waitid.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__waitid, waitid, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__waitid_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__waitid_nocancel, waitid_nocancel, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__watchevent.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 8 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__watchevent, watchevent, 2) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__workq_kernreturn.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 16 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__workq_kernreturn, workq_kernreturn, 4) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__workq_open.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 0 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__workq_open, workq_open, 0) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__write.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__write, write, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__write_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__write_nocancel, write_nocancel, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__writev.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__writev, writev, 3) 6 | -------------------------------------------------------------------------------- /xnu/syscalls/__writev_nocancel.s: -------------------------------------------------------------------------------- 1 | #define __SYSCALL_32BIT_ARG_BYTES 12 2 | 3 | #include "SYS.h" 4 | 5 | __SYSCALL(__writev_nocancel, writev_nocancel, 3) 6 | --------------------------------------------------------------------------------