Changeset 1787e527 in mainline for kernel/genarch/include/ofw/fhc.h


Ignore:
Timestamp:
2009-11-16T21:22:54Z (14 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
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.
Message:

merged with head (unstable)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/genarch/include/ofw/fhc.h

    rfcbd1be r1787e527  
    11/*
    2  * Copyright (c) 2005 Jakub Jermar
     2 * Copyright (c) 2006 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup generic
    30  * @{
    31  */
    32 /** @file
    33  */
     29#ifndef KERN_FHC_H_
     30#define KERN_FHC_H_
    3431
    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>
    4236
    43 #include <arch/types.h>
     37typedef struct {
     38        uint64_t addr;
     39        uint32_t size;
     40} __attribute__ ((packed)) ofw_fhc_reg_t;
    4441
    45 typedef struct va_list {
    46         int pos;
    47         uint8_t *last;
    48 } va_list;
     42typedef struct {
     43        uint64_t child_base;
     44        uint64_t parent_base;
     45        uint32_t size;
     46} __attribute__ ((packed)) ofw_fhc_range_t;
    4947
    50 #define va_start(ap, lst)               \
    51         (ap).pos = sizeof(lst);                         \
    52         (ap).last = (uint8_t *) &(lst)
     48typedef struct {
     49        uint64_t addr;
     50        uint32_t size;
     51} __attribute__ ((packed)) ofw_central_reg_t;
    5352
    54 #define va_arg(ap, type)                \
    55         (*((type *)((ap).last + ((ap).pos += sizeof(type)) - sizeof(type))))
     53typedef struct {
     54        uint64_t child_base;
     55        uint64_t parent_base;
     56        uint32_t size;
     57} __attribute__ ((packed)) ofw_central_range_t;
    5658
    57 #define va_copy(dst, src) dst = src
    58 #define va_end(ap)
     59extern bool ofw_fhc_apply_ranges(ofw_tree_node_t *, ofw_fhc_reg_t *,
     60    uintptr_t *);
     61extern bool ofw_central_apply_ranges(ofw_tree_node_t *, ofw_central_reg_t *,
     62    uintptr_t *);
    5963
     64extern bool ofw_fhc_map_interrupt(ofw_tree_node_t *, ofw_fhc_reg_t *,
     65    uint32_t, int *, cir_t *, void **);
    6066
    6167#endif
    62 
    63 /** @}
    64  */
Note: See TracChangeset for help on using the changeset viewer.