Changeset 4872160 in mainline for boot/genarch/include
- Timestamp:
- 2010-05-04T10:44:55Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 568db0f
- Parents:
- bb252ca
- Location:
- boot/genarch/include
- Files:
-
- 1 deleted
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/genarch/include/division.h
rbb252ca r4872160 1 1 /* 2 * Copyright (c) 2007 Michal Kebrt 3 * Copyright (c) 2009 Vineeth Pillai 2 * Copyright (c) 2006 Josef Cejka 4 3 * All rights reserved. 5 4 * … … 28 27 */ 29 28 29 /** @file 30 */ 30 31 31 /** @addtogroup arm32boot 32 * @{ 33 */ 34 /** @file 35 * @brief bootloader output logic 36 */ 32 #ifndef BOOT_DIVISION_H_ 33 #define BOOT_DIVISION_H_ 37 34 35 /* 32bit integer division */ 36 extern int __divsi3(int, int); 38 37 39 #include <printf.h> 38 /* 64bit integer division */ 39 extern long long __divdi3(long long, long long); 40 40 41 /* 32bit unsigned integer division */ 42 extern unsigned int __udivsi3(unsigned int, unsigned int); 41 43 42 /** Address where characters to be printed are expected. */ 43 #ifdef MACHINE_testarm 44 #define PUTC_ADDRESS 0x10000000 44 /* 64bit unsigned integer division */ 45 extern unsigned long long __udivdi3(unsigned long long, unsigned long long); 46 47 /* 32bit remainder of the signed division */ 48 extern int __modsi3(int, int); 49 50 /* 64bit remainder of the signed division */ 51 extern long long __moddi3(long long, long long); 52 53 /* 32bit remainder of the unsigned division */ 54 extern unsigned int __umodsi3(unsigned int, unsigned int); 55 56 /* 64bit remainder of the unsigned division */ 57 extern unsigned long long __umoddi3(unsigned long long, unsigned long long); 58 59 extern unsigned long long __udivmoddi3(unsigned long long, unsigned long long, 60 unsigned long long *); 61 45 62 #endif 46 47 #ifdef MACHINE_integratorcp48 #define PUTC_ADDRESS 0x1600000049 #endif50 51 52 53 /** Prints a character to the console.54 *55 * @param ch Character to be printed.56 */57 static void putc(char ch)58 {59 if (ch == '\n')60 *((volatile char *) PUTC_ADDRESS) = '\r';61 *((volatile char *) PUTC_ADDRESS) = ch;62 }63 64 65 /** Prints a string to the console.66 *67 * @param str String to be printed.68 * @param len Number of characters to be printed.69 */70 void write(const char *str, const int len)71 {72 int i;73 for (i = 0; i < len; ++i) {74 putc(str[i]);75 }76 }77 63 78 64 /** @} 79 65 */ 80 -
boot/genarch/include/multiplication.h
rbb252ca r4872160 1 1 /* 2 * Copyright (c) 200 6 Jakub Jermar2 * Copyright (c) 2009 Josef Cejka 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 #ifndef BOOT_sparc64_STACK_H_ 30 #define BOOT_sparc64_STACK_H_ 29 /** 30 * @file 31 */ 31 32 32 #define STACK_ALIGNMENT 16 33 #define STACK_BIAS 2047 34 #define STACK_WINDOW_SAVE_AREA_SIZE (16 * 8) 33 #ifndef BOOT_MULTIPLICATION_H__ 34 #define BOOT_MULTIPLICATION_H__ 35 36 /* 64 bit multiplication */ 37 extern long long __muldi3(long long, long long); 35 38 36 39 #endif 40 41 /** @} 42 */ 43 44 -
boot/genarch/include/ofw.h
rbb252ca r4872160 30 30 #define BOOT_OFW_H_ 31 31 32 #include <type s.h>32 #include <typedefs.h> 33 33 #include <stdarg.h> 34 34 … … 41 41 42 42 typedef unative_t ofw_arg_t; 43 typedef unsigned int ihandle; 44 typedef unsigned int phandle; 43 typedef native_t ofw_ret_t; 44 typedef uint32_t ofw_prop_t; 45 typedef uint32_t ihandle; 46 typedef uint32_t phandle; 45 47 46 48 /** OpenFirmware command structure … … 56 58 typedef struct { 57 59 void *start; 58 uint32_t size;60 size_t size; 59 61 } memzone_t; 60 62 61 63 typedef struct { 62 uint 32_t total;63 uint32_t count;64 uint64_t total; 65 size_t cnt; 64 66 memzone_t zones[MEMMAP_MAX_RECORDS]; 65 67 } memmap_t; … … 87 89 extern void ofw_init(void); 88 90 89 extern void ofw_ write(const char *str, const int len);91 extern void ofw_putchar(const char); 90 92 91 extern int ofw_get_property(const phandle device, const char *name, void *buf, const int buflen); 92 extern int ofw_get_proplen(const phandle device, const char *name); 93 extern int ofw_next_property(const phandle device, char *previous, char *buf); 93 extern ofw_arg_t ofw_get_property(const phandle, const char *, void *, 94 const size_t); 95 extern ofw_arg_t ofw_get_proplen(const phandle, const char *); 96 extern ofw_arg_t ofw_next_property(const phandle, char *, char *); 94 97 95 extern phandle ofw_get_child_node(const phandle node);96 extern phandle ofw_get_peer_node(const phandle node);97 extern phandle ofw_find_device(const char * name);98 extern phandle ofw_get_child_node(const phandle); 99 extern phandle ofw_get_peer_node(const phandle); 100 extern phandle ofw_find_device(const char *); 98 101 99 extern int ofw_package_to_path(const phandle device, char *buf, const int buflen);102 extern ofw_arg_t ofw_package_to_path(const phandle, char *, const size_t); 100 103 101 extern int ofw(ofw_args_t *arg); 102 extern unsigned long ofw_call(const char *service, const int nargs, const int nret, ofw_arg_t *rets, ...); 103 extern unsigned int ofw_get_address_cells(const phandle device); 104 extern unsigned int ofw_get_size_cells(const phandle device); 105 extern void *ofw_translate(const void *virt); 106 extern int ofw_translate_failed(ofw_arg_t flag); 107 extern void *ofw_claim_virt(const void *virt, const unsigned int len); 108 extern void *ofw_claim_phys(const void *virt, const unsigned int len); 109 extern void *ofw_claim_phys_any(const unsigned int len, const unsigned int alignment); 110 extern int ofw_map(const void *phys, const void *virt, const unsigned int size, const int mode); 111 extern int ofw_memmap(memmap_t *map); 104 extern ofw_arg_t ofw(ofw_args_t *); 105 extern ofw_arg_t ofw_call(const char *, const size_t, const size_t, ofw_arg_t *, 106 ...); 107 108 extern size_t ofw_get_address_cells(const phandle); 109 extern size_t ofw_get_size_cells(const phandle); 110 111 extern void *ofw_translate(const void *); 112 113 extern void ofw_claim_virt(const void *, const size_t); 114 extern void *ofw_claim_virt_any(const size_t, const size_t); 115 116 extern void ofw_claim_phys(const void *, const size_t); 117 extern void *ofw_claim_phys_any(const size_t, const size_t); 118 119 extern void ofw_map(const void *, const void *, const size_t, 120 const ofw_arg_t); 121 122 extern void ofw_alloc(const char *, void **, void **, const size_t, void *); 123 124 extern void ofw_memmap(memmap_t *); 112 125 extern void ofw_setup_screens(void); 113 126 extern void ofw_quiesce(void); -
boot/genarch/include/ofw_tree.h
rbb252ca r4872160 30 30 #define BOOT_OFW_TREE_H_ 31 31 32 #include <types.h> 33 #include <ofw.h> 34 32 #include <typedefs.h> 33 #include <genarch/ofw.h> 35 34 36 35 /** Memory representation of OpenFirmware device tree node property. */ … … 47 46 struct ofw_tree_node *child; 48 47 49 uint32_t node_handle;/**< Old OpenFirmware node handle. */48 phandle node_handle; /**< Old OpenFirmware node handle. */ 50 49 51 50 char *da_name; /**< Disambigued name. */ 52 51 53 unsigned int properties;/**< Number of properties. */52 size_t properties; /**< Number of properties. */ 54 53 ofw_tree_property_t *property; 55 54
Note:
See TracChangeset
for help on using the changeset viewer.