amba_device.cc (9808:13ffc0066b76) | amba_device.cc (10565:23593fdaadcd) |
---|---|
1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 62 unchanged lines hidden (view full) --- 71 72bool 73AmbaDevice::readId(PacketPtr pkt, uint64_t amba_id, Addr pio_addr) 74{ 75 Addr daddr = pkt->getAddr() - pio_addr; 76 if (daddr < AMBA_PER_ID0 || daddr > AMBA_CEL_ID3) 77 return false; 78 | 1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 62 unchanged lines hidden (view full) --- 71 72bool 73AmbaDevice::readId(PacketPtr pkt, uint64_t amba_id, Addr pio_addr) 74{ 75 Addr daddr = pkt->getAddr() - pio_addr; 76 if (daddr < AMBA_PER_ID0 || daddr > AMBA_CEL_ID3) 77 return false; 78 |
79 pkt->allocate(); 80 | |
81 int byte = (daddr - AMBA_PER_ID0) << 1; 82 // Too noisy right now 83 DPRINTF(AMBA, "Returning %#x for offset %#x(%d)\n", 84 (amba_id >> byte) & 0xFF, 85 pkt->getAddr() - pio_addr, byte); 86 assert(pkt->getSize() == 4); 87 pkt->set<uint32_t>((amba_id >> byte) & 0xFF); 88 return true; 89} | 79 int byte = (daddr - AMBA_PER_ID0) << 1; 80 // Too noisy right now 81 DPRINTF(AMBA, "Returning %#x for offset %#x(%d)\n", 82 (amba_id >> byte) & 0xFF, 83 pkt->getAddr() - pio_addr, byte); 84 assert(pkt->getSize() == 4); 85 pkt->set<uint32_t>((amba_id >> byte) & 0xFF); 86 return true; 87} |