Changeset 1787e527 in mainline for kernel/genarch/include/ofw/fhc.h
- Timestamp:
- 2009-11-16T21:22:54Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5ebdf94
- Parents:
- fcbd1be (diff), 9c70ed6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/include/ofw/fhc.h
rfcbd1be r1787e527 1 1 /* 2 * Copyright (c) 200 5Jakub Jermar2 * Copyright (c) 2006 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup generic 30 * @{ 31 */ 32 /** @file 33 */ 29 #ifndef KERN_FHC_H_ 30 #define KERN_FHC_H_ 34 31 35 /* 36 * Variable argument list manipulation macros 37 * for architectures using stack to pass arguments. 38 */ 39 40 #ifndef KERN_STACKARG_H_ 41 #define KERN_STACKARG_H_ 32 #include <genarch/ofw/ofw_tree.h> 33 #include <arch/types.h> 34 #include <ddi/irq.h> 35 #include <typedefs.h> 42 36 43 #include <arch/types.h> 37 typedef struct { 38 uint64_t addr; 39 uint32_t size; 40 } __attribute__ ((packed)) ofw_fhc_reg_t; 44 41 45 typedef struct va_list { 46 int pos; 47 uint8_t *last; 48 } va_list; 42 typedef struct { 43 uint64_t child_base; 44 uint64_t parent_base; 45 uint32_t size; 46 } __attribute__ ((packed)) ofw_fhc_range_t; 49 47 50 #define va_start(ap, lst) \ 51 (ap).pos = sizeof(lst); \ 52 (ap).last = (uint8_t *) &(lst) 48 typedef struct { 49 uint64_t addr; 50 uint32_t size; 51 } __attribute__ ((packed)) ofw_central_reg_t; 53 52 54 #define va_arg(ap, type) \ 55 (*((type *)((ap).last + ((ap).pos += sizeof(type)) - sizeof(type)))) 53 typedef struct { 54 uint64_t child_base; 55 uint64_t parent_base; 56 uint32_t size; 57 } __attribute__ ((packed)) ofw_central_range_t; 56 58 57 #define va_copy(dst, src) dst = src 58 #define va_end(ap) 59 extern bool ofw_fhc_apply_ranges(ofw_tree_node_t *, ofw_fhc_reg_t *, 60 uintptr_t *); 61 extern bool ofw_central_apply_ranges(ofw_tree_node_t *, ofw_central_reg_t *, 62 uintptr_t *); 59 63 64 extern bool ofw_fhc_map_interrupt(ofw_tree_node_t *, ofw_fhc_reg_t *, 65 uint32_t, int *, cir_t *, void **); 60 66 61 67 #endif 62 63 /** @}64 */
Note:
See TracChangeset
for help on using the changeset viewer.