X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..743b15655a24ee3fe9f458f383003e011db0558f:/osfmk/kern/misc_protos.h diff --git a/osfmk/kern/misc_protos.h b/osfmk/kern/misc_protos.h index 329bc4db7..193dce700 100644 --- a/osfmk/kern/misc_protos.h +++ b/osfmk/kern/misc_protos.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -33,6 +33,7 @@ #include #include #include +#include /* Set a bit in a bit array */ extern void setbit( @@ -57,58 +58,35 @@ extern int testbit( int which, int *bitmap); -/* Move arbitrarily-aligned data from one array to another */ -extern void bcopy( - const char *from, - char *to, - vm_size_t nbytes); - -/* Move overlapping, arbitrarily aligned data from one array to another */ -/* Not present on all ports */ -extern void ovbcopy( - const char *from, - char *to, - vm_size_t nbytes); - -extern int bcmp( - const char *a, - const char *b, - vm_size_t len); - -/* Zero an arbitrarily aligned array */ -extern void bzero( - char *from, - vm_size_t nbytes); - /* Move arbitrarily-aligned data from a user space to kernel space */ -extern boolean_t copyin( - const char *user_addr, - char *kernel_addr, - vm_size_t nbytes); +extern int copyin( + const user_addr_t user_addr, + char *kernel_addr, + vm_size_t nbytes); /* Move a NUL-terminated string from a user space to kernel space */ -extern boolean_t copyinstr( - const char *user_addr, - char *kernel_addr, - vm_size_t max, - vm_size_t *actual); +extern int copyinstr( + const user_addr_t user_addr, + char *kernel_addr, + vm_size_t max, + vm_size_t *actual); /* Move arbitrarily-aligned data from a user space to kernel space */ -extern boolean_t copyinmsg( - const char *user_addr, - char *kernel_addr, - mach_msg_size_t nbytes); +extern int copyinmsg( + const user_addr_t user_addr, + char *kernel_addr, + mach_msg_size_t nbytes); /* Move arbitrarily-aligned data from a kernel space to user space */ -extern boolean_t copyout( - const char *kernel_addr, - char *user_addr, - vm_size_t nbytes); +extern int copyout( + const char *kernel_addr, + user_addr_t user_addr, + vm_size_t nbytes); /* Move arbitrarily-aligned data from a kernel space to user space */ -extern boolean_t copyoutmsg( - const char *kernel_addr, - char *user_addr, +extern int copyoutmsg( + const char *kernel_addr, + user_addr_t user_addr, mach_msg_size_t nbytes); extern int sscanf(const char *input, const char *fmt, ...); @@ -117,11 +95,11 @@ extern integer_t sprintf(char *buf, const char *fmt, ...); extern void printf(const char *format, ...); -extern void printf_init(void); +extern void dbugprintf(const char *format, ...); -extern void panic(const char *string, ...); +extern void kdp_printf(const char *format, ...); -extern void panic_init(void); +extern void printf_init(void); extern void log(int level, char *fmt, ...); @@ -131,6 +109,13 @@ _doprnt( va_list *argp, void (*putc)(char), int radix); +int +__doprnt( + register const char *fmt, + va_list *argp, + void (*putc)(int, void *), + void *arg, + int radix); extern void safe_gets( char *str, @@ -138,6 +123,10 @@ extern void safe_gets( extern void cnputcusr(char); +extern void conslog_putc(char); + +extern void consdebug_putc(char); + extern void cnputc(char); extern int cngetc(void); @@ -153,30 +142,12 @@ extern int _longjmp( extern void bootstrap_create(void); -extern void halt_cpu(void); - -extern void halt_all_cpus( - boolean_t reboot); - extern void Debugger( const char * message); extern void delay( int n); -extern char *machine_boot_info( - char *buf, - vm_size_t buf_len); - -/* - * Machine-dependent routine to fill in an array with up to callstack_max - * levels of return pc information. - */ -extern void machine_callstack( - natural_t *buf, - vm_size_t callstack_max); - -extern void consider_machine_collect(void); extern void norma_bootstrap(void); @@ -185,4 +156,9 @@ extern boolean_t no_bootstrap_task(void); extern ipc_port_t get_root_master_device_port(void); #endif /* DIPC */ +extern kern_return_t kernel_set_special_port( + host_priv_t host_priv, + int which, + ipc_port_t port); + #endif /* _MISC_PROTOS_H_ */