Beispiel #1
0
def ramfs_scan_el():
    return Element("ramfs_scan",
                   paddr_start = (size_attr, "required"),
                   paddr_end = (size_attr, "required"),
                   paddr_step = (size_attr, "required"))
Beispiel #2
0
# iv.  the payment of the cost of having the goods repaired; or
# b.  in the case of services:
# i.  the supplying of the services again; or
# ii.  the payment of the cost of having the services supplied again.
#
# The construction, validity and performance of this licence is governed
# by the laws in force in New South Wales, Australia.
"""
Processing of the program XML element.
"""

from ezxml import Element, long_attr, str_attr, size_attr
import re
import sys

Stack_size_el = Element("stack_size", value=(size_attr, "required"))

App_heap_size_el = Element("heap_size",
                           name=(str_attr, "required"),
                           value=(size_attr, "required"))

MainPrio_el = Element("main_priority", value=(str_attr, "required"))

MainBitmask_el = Element("main_bitmask", value=(str_attr, "optional"))

MaxPiPrio_el = Element("max_pimutex_prio", value=(str_attr, "optional"))

TlbRepl_el = Element("tlb_first_replaceable", value=(str_attr, "optional"))

Memsection_el = Element("memsection",
                        glob=(str_attr, "optional"),
Beispiel #3
0
 def element(self):
     return Element("mapping_protect",
                    Element("region",
                            base=(long_attr, "required"),
                            size=(size_attr, "required")))
Beispiel #4
0
def object_cache_el():
    T = (long_attr, "optional")
    L = [(e,T) for e in object_cache_keys.split()]
    D = dict((k,v) for (k,v) in L)
    return Element("object_cache", **D)
Beispiel #5
0
    D = dict((k, v) for (k, v) in L)
    return Element("object_cache", **D)


def object_cache_initializer(elems):
    L = [(e, 'OBJCACHE_DEFAULT') for e in object_cache_keys.split()]
    D = dict((k, v) for (k, v) in L)
    for E in elems:
        D.update(E.__dict__)
    L = [".%s = %s" % (e, str(D[e])) for e in object_cache_keys.split()]
    S = ', \\\n   '.join(L)
    return S


# FIXME: support "fastint_stack size= " until cust_config.xml can move to "fastint_stack_size value= "
Fastint_stack_el = Element("fastint_stack", size=(str_attr, "optional"))

Tcmdump_el = Element("tcm_dump",
                     size=(size_attr, "optional"),
                     type=(str_attr, "optional"))

Kernel_el = Element("kernel", object_cache_el(), Fastint_stack_el, Tcmdump_el,
                    *[Element(e[0], value=(e[1], e[2])) for e in kernel_db])


def kernel_hook(cfg, name, value):
    if name == 'max_user_processes':
        if value > 0:
            # If max_user_processes is positive,
            #  add initialization functions to pull
            #  in user process support
Beispiel #6
0
    return Element("ramfs_scan",
                   paddr_start = (size_attr, "required"),
                   paddr_end = (size_attr, "required"),
                   paddr_step = (size_attr, "required"))

def object_cache_initializer(elems):
    L = [(e,'OBJCACHE_DEFAULT') for e in object_cache_keys.split()]
    D = dict((k,v) for (k,v) in L)
    for E in elems:
        D.update(E.__dict__)
    L = [".%s = %s" % (e,str(D[e])) for e in object_cache_keys.split()]
    S = ', \\\n   '.join(L)
    return S

# FIXME: support "fastint_stack size= " until cust_config.xml can move to "fastint_stack_size value= " 
Fastint_stack_el = Element("fastint_stack",
                      size = (str_attr,"optional"))

Tcmdump_el = Element("tcm_dump",
                      size = (size_attr, "optional"),
                      error = (str_attr, "optional"),
                      power = (str_attr, "optional"),
                      pool = (str_attr, "optional"))

VTLB_el = Element("vtlb",
                  entries = (size_attr, "optional"),
                  tree = (size_attr, "optional"),
                  section = (str_attr, "optional"))

Autostack_el = Element("autostack", 
                        pool_size = (size_attr, "optional"),
                        watermark_lo = (long_attr, "optional"),
Beispiel #7
0
# iv.  the payment of the cost of having the goods repaired; or
# b.  in the case of services:
# i.  the supplying of the services again; or
# ii.  the payment of the cost of having the services supplied again.
#
# The construction, validity and performance of this licence is governed
# by the laws in force in New South Wales, Australia.
"""
Processing of the program XML element.
"""

from ezxml import Element, long_attr, str_attr, size_attr
import re
import sys

Min_image_page_el = Element("min_image_page", value=(size_attr, "optional"))

Osam_stack_fill_count_el = Element("osam_stack_fill_count",
                                   value=(size_attr, "optional"))

Stack_size_el = Element("stack_size", value=(size_attr, "required"))

App_heap_size_el = Element("heap_size",
                           name=(str_attr, "required"),
                           type=(str_attr, "optional"),
                           value=(size_attr, "required"))

App_dynamic_def_pool_size_el = Element("dynamic_default_pool_size",
                                       name=(str_attr, "optional"),
                                       type=(str_attr, "optional"),
                                       value=(size_attr, "required"))
Beispiel #8
0
# iv.  the payment of the cost of having the goods repaired; or
# b.  in the case of services:
# i.  the supplying of the services again; or
# ii.  the payment of the cost of having the services supplied again.
#
# The construction, validity and performance of this licence is governed
# by the laws in force in New South Wales, Australia.
"""
Processing of the program XML element.
"""

from ezxml import Element, long_attr, str_attr, size_attr
import re
import sys

Osam_stack_fill_count_el = Element("osam_stack_fill_count",
                                   value=(size_attr, "optional"))

Stack_size_el = Element("stack_size", value=(size_attr, "required"))

App_heap_size_el = Element("heap_size",
                           name=(str_attr, "required"),
                           type=(str_attr, "optional"),
                           value=(size_attr, "required"))

MainPrio_el = Element("main_priority", value=(str_attr, "required"))

MainBitmask_el = Element("main_bitmask", value=(str_attr, "optional"))

ReaperPrio_el = Element("reaper_priority", value=(str_attr, "required"))

ReaperTcbPartition_el = Element("reaper_tcb_partition",
Beispiel #9
0
# b.  in the case of services:
# i.  the supplying of the services again; or
# ii.  the payment of the cost of having the services supplied again.
#
# The construction, validity and performance of this licence is governed
# by the laws in force in New South Wales, Australia.
"""
Processing of the physpool XML element.
"""

from ezxml import Element, long_attr, str_attr, size_attr
import re
import sys

Region_el = Element("region",
                    base=(long_attr, "required"),
                    size=(size_attr, "required"),
                    type=(str_attr, "optional"))

PhysicalPool_el = Element("physical_pool",
                          Region_el,
                          name=(str_attr, "required"))


def collect_physpool_element(parsed, ignore_name, asic):
    """Collect the attributes of the machine element."""
    physpool_el = parsed.find_children("physical_pool")

    if not physpool_el:
        return

    symbols = {}
Beispiel #10
0
#
###############################################################################

import sys, sets, time
from ezxml import Element, long_attr, str_attr


def uniq(lst):
    return list(sets.Set(lst))


###############################################################################
# Define the XML elements
###############################################################################
resource_el = Element("resource",
                      name=(str_attr, "required"),
                      rtype=(str_attr, "required"))

state_el = Element("state", name=(str_attr, "required"))

field_el = Element(
    "field",
    name=(str_attr, "required"),
    bits=(str_attr, "required"),
)

reg_el = Element("register",
                 field_el,
                 name=(str_attr, "required"),
                 offset=(long_attr, "required"),
                 type=(str_attr, "required"))
Beispiel #11
0
# in an "*_if.di" file).
#
###############################################################################
import sys, sets
from ezxml import Element, long_attr, str_attr


def uniq(lst):
    return list(sets.Set(lst))


################################################################################
# Define the XML elements
################################################################################
datafield_el = Element("datafield",
                       ftype=(str_attr, "required"),
                       name=(str_attr, "required"))

arg_el = Element("arg",
                 atype=(str_attr, "required"),
                 name=(str_attr, "required"))

method_el = Element("method",
                    arg_el,
                    name=(str_attr, "required"),
                    rtype=(str_attr, "required"))

interface_el = Element("interface",
                       method_el,
                       datafield_el,
                       name=(str_attr, "required"))
# i.  the replacement of the goods or the supply of equivalent goods;
# ii.  the repair of the goods;
# iii. the payment of the cost of replacing the goods or of acquiring
#  equivalent goods;
# iv.  the payment of the cost of having the goods repaired; or
# b.  in the case of services:
# i.  the supplying of the services again; or
# ii.  the payment of the cost of having the services supplied again.
#
# The construction, validity and performance of this licence is governed
# by the laws in force in New South Wales, Australia.

from ezxml import Element, long_attr, str_attr, size_attr
import re

Hthread_mask_el = Element("hthread_mask", value=(str_attr, "required"))
Kernel_heap_size_el = Element("heap_size", value=(size_attr, "optional"))
Max_threads_el = Element("max_threads", value=(str_attr, "required"))
Max_threads_in_tcm_el = Element("max_threads_in_tcm",
                                value=(str_attr, "optional"))
Max_futexes_el = Element("max_futexes", value=(str_attr, "required"))
Trace_mask_el = Element("trace_mask", value=(str_attr, "required"))
Trace_size_el = Element("trace_size", value=(size_attr, "required"))
Fastint_stack_el = Element("fastint_stack", size=(str_attr, "optional"))
Kernel_tcm_size_el = Element("tcm_size", value=(size_attr, "optional"))

Kernel_el = Element("kernel", Hthread_mask_el, Kernel_heap_size_el,
                    Max_threads_el, Max_threads_in_tcm_el, Max_futexes_el,
                    Trace_mask_el, Trace_size_el, Fastint_stack_el,
                    Kernel_tcm_size_el)
# b.  in the case of services:
# i.  the supplying of the services again; or
# ii.  the payment of the cost of having the services supplied again.
# 
# The construction, validity and performance of this licence is governed
# by the laws in force in New South Wales, Australia.

"""
Processing of the machine XML element.
"""

from ezxml import Element, long_attr, str_attr, size_attr
import re
import sys

Qdsp6_base_el = Element("Hexagon_ss_base",
                         value = (long_attr, "required"))
Tcxo_el = Element("tcxo",
                  intmask = (long_attr, "optional"))
QtimerBase_el = Element("base",
                      value = (long_attr, "optional"))                      
Intno_el = Element("intno",
                      value = (str_attr, "required"))
Priority_el = Element("priority",
                      value = (str_attr, "required"))
Bitmask_el = Element("bitmask",
                     value = (str_attr, "optional"))
IST_priority_el = Element("IST_priority",
                          value = (str_attr, "required"))
IST_bitmask_el = Element("IST_bitmask",
                         value = (str_attr, "optional"))
Timer_el = Element("timer",
# iv.  the payment of the cost of having the goods repaired; or
# b.  in the case of services:
# i.  the supplying of the services again; or
# ii.  the payment of the cost of having the services supplied again.
#
# The construction, validity and performance of this licence is governed
# by the laws in force in New South Wales, Australia.
"""
Processing of the machine XML element.
"""

from ezxml import Element, long_attr, str_attr, size_attr
import re
import sys

Qdsp6_base_el = Element("Hexagon_ss_base", value=(long_attr, "required"))
Tcxo_el = Element("tcxo", intmask=(long_attr, "optional"))
QtimerBase_el = Element("base", value=(long_attr, "optional"))
Intno_el = Element("intno", value=(str_attr, "required"))
Priority_el = Element("priority", value=(str_attr, "required"))
Bitmask_el = Element("bitmask", value=(str_attr, "optional"))
IST_priority_el = Element("IST_priority", value=(str_attr, "required"))
IST_tcb_partition_el = Element("IST_tcb_partition",
                               value=(str_attr, "required"))
IST_bitmask_el = Element("IST_bitmask", value=(str_attr, "optional"))
"""
The following timer attributes are unused but kept for backward compatibility:
IST_bitmask_el, Priority_el, Bitmask_el
"""
Timer_el = Element(
    "timer",
Beispiel #15
0
# ii.  the payment of the cost of having the services supplied again.
#
# The construction, validity and performance of this licence is governed
# by the laws in force in New South Wales, Australia.

"""
Processing of the machine XML element.
"""

from ezxml import Element, long_attr, str_attr, size_attr
from StaticSyscfgComposer import StaticSyscfgComposer
import re
import sys
import l2cfg_xml

Qdsp6_base_el = Element("Hexagon_ss_base",
                         value = (long_attr, "required"))
Fastl2port_base_el = Element("fast_l2vic_port_base",
                         value = (long_attr, "optional"))
Clade_cfg_base_el = Element("clade_cfg_base",
                         value = (long_attr, "optional"))
Clade_exc_hi_word_el = Element("clade_exc_hi_word",
                         value = (size_attr, "optional"))
Clade_dict_word_el = Element("clade_dict_word",
                         value = (size_attr, "optional"))						 
Tcxo_el = Element("tcxo",
                  intmask = (long_attr, "optional"))
QtimerBase_el = Element("base",
                      value = (long_attr, "optional"))
Intno_el = Element("intno",
                      value = (str_attr, "required"))
Priority_el = Element("priority",
Beispiel #16
0
# i.  the supplying of the services again; or
# ii.  the payment of the cost of having the services supplied again.
#
# The construction, validity and performance of this licence is governed
# by the laws in force in New South Wales, Australia.
"""
Processing of the machine XML element.
"""

from ezxml import Element, long_attr, str_attr, size_attr
import re

Irq_el = Element("irq",
                 num=(str_attr, "required"),
                 trigger=(str_attr, "required"),
                 polarity=(str_attr, "required"),
                 l2base=(str_attr, "optional"),
                 l2trigger=(str_attr, "optional"),
                 l2polarity=(str_attr, "optional"))
Interrupt_el = Element("interrupt", Irq_el)


def collect_v2v3_interrupt_elements(int_el):
    v2_base_string = [
        "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
        "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
        "0", "0", "0", "0"
    ]
    v2_type_string = [
        "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
        "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
Beispiel #17
0
# ii.  the payment of the cost of having the services supplied again.
# 
# The construction, validity and performance of this licence is governed
# by the laws in force in New South Wales, Australia.
"""
Processing of the physpool XML element.
"""

from ezxml import Element, long_attr, str_attr, size_attr
from qurt import *

Region_el = Element("region",
                    allocate = (str_attr, "optional"),
                    section = (str_attr, "optional"),
                    align = (size_attr, "optional"),
                    base = (long_attr, "optional"),
                    padding = (size_attr, "optional"),
                    name = (str_attr, "optional"),
                    cache_policy = (str_attr, "optional"),
                    size = (size_attr, "required"),
                    type = (str_attr, "optional"))

SrmResources_el = Element("srm_resources",
                          Region_el)

PhysicalPool_el = Element("physical_pool",
                            Region_el,
                            name = (str_attr, "required"))

def verify_name(cfg, name):
    if name == '':
        raise Exception('Pool name must be non-empty')