1/* 2 * Copyright 2013, winocm. <winocm@icloud.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without modification, 6 * are permitted provided that the following conditions are met: 7 * 8 * Redistributions of source code must retain the above copyright notice, this 9 * list of conditions and the following disclaimer. 10 * 11 * Redistributions in binary form must reproduce the above copyright notice, this 12 * list of conditions and the following disclaimer in the documentation and/or 13 * other materials provided with the distribution. 14 * 15 * If you are going to use this software in any form that does not involve 16 * releasing the source to this project or improving it, let me know beforehand. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 22 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 25 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29/* 30 * Unimplemented stubs. 31 */ 32 33#include <arm/arch.h> 34 35#define _genQuoteString(x) #x 36#define genString(x) _genQuoteString(x is not implemented.) 37 38#define UNIMPLEMENTED_STUB(Function) \ 39 .align 4; \ 40 .globl Function ; \ 41 Function: ; \ 42 nop ; \ 43 nop ; \ 44 nop ; \ 45 nop ; \ 46 nop ; \ 47 nop ; \ 48 nop ; \ 49 nop ; \ 50 nop ; \ 51 nop ; \ 52 nop ; \ 53 nop ; \ 54 ldr r0, ps_ptr_ ##Function ; \ 55 blx _panic ; \ 56 ps_ptr_ ##Function: ; \ 57 .long panicString_ ##Function ; \ 58 panicString_ ##Function: ; \ 59 .asciz genString(Function) ; 60 61#ifndef _ARM_ARCH_7 62#undef UNIMPLEMENTED_STUB 63#define UNIMPLEMENTED_STUB(Function) \ 64 .align 4; \ 65 .globl Function ; \ 66 Function: ; \ 67 ldr r0, ps_ptr_ ##Function ; \ 68 blx _panic ; \ 69 ps_ptr_ ##Function: ; \ 70 .long panicString_ ##Function ; \ 71 panicString_ ##Function: ; \ 72 .asciz genString(Function) ; 73#endif 74 75UNIMPLEMENTED_STUB(_aout_db_init) 76UNIMPLEMENTED_STUB(_aout_db_line_at_pc) 77UNIMPLEMENTED_STUB(_aout_db_lookup) 78UNIMPLEMENTED_STUB(_aout_db_lookup_incomplete) 79UNIMPLEMENTED_STUB(_aout_db_print_completion) 80UNIMPLEMENTED_STUB(_aout_db_search_by_addr) 81UNIMPLEMENTED_STUB(_aout_db_search_symbol) 82UNIMPLEMENTED_STUB(_aout_db_sym_init) 83UNIMPLEMENTED_STUB(_aout_db_symbol_values) 84UNIMPLEMENTED_STUB(_cpu_sleep) 85UNIMPLEMENTED_STUB(_db_inst_load) 86UNIMPLEMENTED_STUB(_fasttrap_pid_getarg) 87UNIMPLEMENTED_STUB(_fasttrap_pid_probe) 88UNIMPLEMENTED_STUB(_fasttrap_return_probe) 89UNIMPLEMENTED_STUB(_fasttrap_tracepoint_init) 90UNIMPLEMENTED_STUB(_fasttrap_tracepoint_install) 91UNIMPLEMENTED_STUB(_fasttrap_tracepoint_remove) 92UNIMPLEMENTED_STUB(_fasttrap_usdt_getarg) 93UNIMPLEMENTED_STUB(_fbt_invop) 94UNIMPLEMENTED_STUB(_fbt_perfCallback) 95UNIMPLEMENTED_STUB(_fbt_provide_module) 96UNIMPLEMENTED_STUB(_gIOHibernateRestoreStack) 97UNIMPLEMENTED_STUB(_gIOHibernateRestoreStackEnd) 98UNIMPLEMENTED_STUB(_hibernate_machine_entrypoint) 99UNIMPLEMENTED_STUB(_hibernate_newruntime_map) 100UNIMPLEMENTED_STUB(_hibernate_page_list_allocate) 101UNIMPLEMENTED_STUB(_hibernate_page_list_set_volatile) 102UNIMPLEMENTED_STUB(_hibernate_page_list_setall_machine) 103UNIMPLEMENTED_STUB(_hibernate_processor_setup) 104UNIMPLEMENTED_STUB(_hibernate_restore_phys_page) 105UNIMPLEMENTED_STUB(_hibernate_vm_lock) 106UNIMPLEMENTED_STUB(_hibernate_vm_unlock) 107UNIMPLEMENTED_STUB(_kdb_on) 108UNIMPLEMENTED_STUB(_mapping_set_mod) 109UNIMPLEMENTED_STUB(_ml_nofault_copydeclare_stub) 110UNIMPLEMENTED_STUB(_sdt_invop) 111UNIMPLEMENTED_STUB(_slave_machine_init) 112UNIMPLEMENTED_STUB(_tempDTraceTrapHook) 113UNIMPLEMENTED_STUB(_thread_kdb_return) 114 115UNIMPLEMENTED_STUB(_chudxnu_thread_ast) 116UNIMPLEMENTED_STUB(_cpu_data_ptr) 117UNIMPLEMENTED_STUB(_cpu_exit_wait) 118UNIMPLEMENTED_STUB(_cpuid_cpusubtype) 119UNIMPLEMENTED_STUB(_cpuid_cputype) 120UNIMPLEMENTED_STUB(_dtrace_modload) 121UNIMPLEMENTED_STUB(_dtrace_modunload) 122UNIMPLEMENTED_STUB(_gIOHibernateCurrentHeader) 123UNIMPLEMENTED_STUB(_gIOHibernateDebugFlags) 124UNIMPLEMENTED_STUB(_gIOHibernateHandoffPageCount) 125UNIMPLEMENTED_STUB(_gIOHibernateHandoffPages) 126UNIMPLEMENTED_STUB(_gIOHibernateState) 127UNIMPLEMENTED_STUB(_handle_pending_TLB_flushes) 128UNIMPLEMENTED_STUB(_hibernate_page_bitmap_count) 129UNIMPLEMENTED_STUB(_hibernate_page_bitmap_pin) 130UNIMPLEMENTED_STUB(_hibernate_page_bitset) 131UNIMPLEMENTED_STUB(_hibernate_page_bittst) 132UNIMPLEMENTED_STUB(_hibernate_sum_page) 133UNIMPLEMENTED_STUB(_lockstat_probe) 134UNIMPLEMENTED_STUB(_lockstat_probemap) 135UNIMPLEMENTED_STUB(_machine_processor_shutdown) 136UNIMPLEMENTED_STUB(_machine_task_get_state) 137UNIMPLEMENTED_STUB(_machine_task_set_state) 138UNIMPLEMENTED_STUB(_machine_timeout_suspended) 139UNIMPLEMENTED_STUB(_panic_display_pal_info) 140UNIMPLEMENTED_STUB(_save_kdebug_enable) 141UNIMPLEMENTED_STUB(_thread_setsinglestep) 142