Esempio n. 1
0
  @Override
  public DTNode toDTNode(BoardInfo bi, Connection conn) {
    DTNode node = super.toDTNode(bi, conn);
    node.addProperty(new DTProperty("bus-range"));

    interfaceshandled.clear();

    node.getPropertyByName("bus-range").addHexValues(new long[] {0, 0xFF});

    addTxsNode(conn, node);
    updateTxsNode(node);

    BasicComponent msi_controller = findMSIController(this.vInterfaces);
    if (msi_controller != null) {
      DTProperty msi_dtprop = new DTProperty("msi-parent");
      msi_dtprop.addValue(new DTPropPHandleVal(msi_controller));
      node.addProperty(msi_dtprop);
    }

    node.addProperty(new DTProperty("#address-cells", 3));
    node.addProperty(new DTProperty("#size-cells", 2));
    node.addProperty(new DTProperty("interrupt-map-mask"));
    node.addProperty(new DTProperty("interrupt-map"));
    node.getPropertyByName("interrupt-map-mask").addNumberValues(new long[] {0, 0, 0, 7});

    node.getPropertyByName("interrupt-map").setNumValuesPerRow(6);
    for (int i = 1; i < 5; i++) {
      node.getPropertyByName("interrupt-map").addNumberValues(new long[] {0, 0, 0, i});
      node.getPropertyByName("interrupt-map").addValue(new DTPropPHandleVal(this));
      node.getPropertyByName("interrupt-map").addNumberValues(new long[] {i});
    }
    return node;
  }
Esempio n. 2
0
  private void addTxsNode(Connection conn, DTNode node) {
    Vector<String> vRegNames = new Vector<String>();
    Vector<Long> vRegs = getReg((conn != null ? conn.getMasterModule() : null), vRegNames);
    int txsRegPosition;
    int width = 2;
    if (conn != null)
      width =
          conn.getMasterInterface().getPrimaryWidth()
              + conn.getMasterInterface().getSecondaryWidth();

    for (txsRegPosition = 0; txsRegPosition < vRegNames.size(); txsRegPosition++) {
      if (vRegNames.get(txsRegPosition).equalsIgnoreCase("txs")) break;
    }

    if (vRegs.size() > 0) {
      node.addProperty(new DTProperty("ranges"));
      node.getPropertyByName("ranges")
          .addHexValues(
              new long[] {
                PCI_PHYS_HI_RELOCATABLE | PCI_PHYS_HI_SPACE_MEM32,
                0,
                0,
                vRegs.get(txsRegPosition * width),
                vRegs.get(txsRegPosition * width + 1),
                0x0,
                vRegs.get(txsRegPosition * width + 2)
              });
    }
  }
Esempio n. 3
0
 private void updateTxsNode(DTNode node) {
   DTProperty property = node.getPropertyByName("reg-names");
   if (property == null) {
     return;
   }
   for (int i = 0; i < property.getValues().size(); i++) {
     if (property.getValues().get(i).toString().equals("\"txs\""))
       property.getValues().set(i, new DTPropStringVal("Txs"));
     if (property.getValues().get(i).toString().equals("\"cra\""))
       property.getValues().set(i, new DTPropStringVal("Cra"));
   }
 }