home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 4 / hacker04 / 04_HACK04.ISO / darwin / darwinx86.iso / usr / include / pexpert / ppc / powermac.h < prev   
Encoding:
C/C++ Source or Header  |  2001-09-30  |  1.8 KB  |  58 lines

  1. /*
  2.  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  3.  *
  4.  * @APPLE_LICENSE_HEADER_START@
  5.  * 
  6.  * The contents of this file constitute Original Code as defined in and
  7.  * are subject to the Apple Public Source License Version 1.1 (the
  8.  * "License").  You may not use this file except in compliance with the
  9.  * License.  Please obtain a copy of the License at
  10.  * http://www.apple.com/publicsource and read it before using this file.
  11.  * 
  12.  * This Original Code and all software distributed under the License are
  13.  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  14.  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  15.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  16.  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
  17.  * License for the specific language governing rights and limitations
  18.  * under the License.
  19.  * 
  20.  * @APPLE_LICENSE_HEADER_END@
  21.  */
  22. #ifndef _PEXPERT_PPC_POWERMAC_H_
  23. #define _PEXPERT_PPC_POWERMAC_H_
  24.  
  25. #ifndef ASSEMBLER
  26.  
  27. #include <mach/ppc/vm_types.h>
  28.  
  29. #include <pexpert/pexpert.h>
  30. #include <pexpert/protos.h>
  31. #include <pexpert/ppc/boot.h>
  32.  
  33.  
  34. /* prototypes */
  35.  
  36. vm_offset_t PE_find_scc( void );
  37.  
  38. /* Some useful typedefs for accessing control registers */
  39.  
  40. typedef volatile unsigned char    v_u_char;
  41. typedef volatile unsigned short v_u_short;
  42. typedef volatile unsigned int    v_u_int;
  43. typedef volatile unsigned long  v_u_long;
  44.  
  45. /* And some useful defines for reading 'volatile' structures,
  46.  * don't forget to be be careful about sync()s and eieio()s
  47.  */
  48. #define reg8(reg) (*(v_u_char *)reg)
  49. #define reg16(reg) (*(v_u_short *)reg)
  50. #define reg32(reg) (*(v_u_int *)reg)
  51.  
  52. /* Non-cached version of bcopy */
  53. extern void    bcopy_nc(char *from, char *to, int size);
  54.  
  55. #endif /* ASSEMBLER */
  56.  
  57. #endif /* _PEXPERT_PPC_POWERMAC_H_ */
  58.