X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/4452a7af2eac33dbad800bcc91f2399d62c18f53..3903760236c30e3b5ace7a4eefac3a269d68957c:/osfmk/kern/page_decrypt.h diff --git a/osfmk/kern/page_decrypt.h b/osfmk/kern/page_decrypt.h index 2f896f313..3860f9b39 100644 --- a/osfmk/kern/page_decrypt.h +++ b/osfmk/kern/page_decrypt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2005-2008 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -26,13 +26,49 @@ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ +#ifdef KERNEL_PRIVATE + #ifndef _KERN_PAGE_DECRYPT_H #define _KERN_PAGE_DECRYPT_H -typedef int (*dsmos_page_transform_hook_t) (const void*,void*); -extern void dsmos_page_transform_hook(dsmos_page_transform_hook_t hook, - void (*commpage_setup_dsmos_blob)(void**, int)); /* exported */ +#include + +/* + * Interface for DSMOS + */ +typedef int (*dsmos_page_transform_hook_t) (const void *,void*, unsigned long long, void *); +extern void dsmos_page_transform_hook(dsmos_page_transform_hook_t hook); /* exported */ + +extern int dsmos_page_transform(const void *,void*, unsigned long long, void*); + -extern int dsmos_page_transform(const void*,void*); +/* + *Interface for text decryption family + */ +struct pager_crypt_info { + /* Decrypt one page */ + int (*page_decrypt)(const void *src_vaddr, void *dst_vaddr, + unsigned long long src_offset, void *crypt_ops); + /* Pager using this crypter terminates - crypt module not needed anymore */ + void (*crypt_end)(void *crypt_ops); + /* Private data for the crypter */ + void *crypt_ops; + volatile int crypt_refcnt; +}; +typedef struct pager_crypt_info pager_crypt_info_t; + +struct crypt_file_data { + char *filename; + cpu_type_t cputype; + cpu_subtype_t cpusubtype; +}; +typedef struct crypt_file_data crypt_file_data_t; + +typedef int (*text_crypter_create_hook_t)(struct pager_crypt_info *crypt_info, + const char *id, void *crypt_data); +extern void text_crypter_create_hook_set(text_crypter_create_hook_t hook); +extern text_crypter_create_hook_t text_crypter_create; #endif /* _KERN_PAGE_DECRYPT_H */ + +#endif /* KERNEL_PRIVATE */