1/* 2 * Copyright (c) 2012-2014 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 --- 645 unchanged lines hidden (view full) --- 654 lastWordDelay(pkt->lastWordDelay), 655 senderState(pkt->senderState) 656 { 657 if (!clearFlags) 658 flags.set(pkt->flags & COPY_FLAGS); 659 660 flags.set(pkt->flags & (VALID_ADDR|VALID_SIZE)); 661 flags.set(pkt->flags & STATIC_DATA); |
662 663 // if we did not copy the static data pointer, allocate data 664 // dynamically instead 665 if (!data) 666 allocate(); |
667 } 668 669 /** 670 * Change the packet type based on request type. 671 */ 672 void 673 refineCommand() 674 { --- 267 unchanged lines hidden (view full) --- 942 delete [] data; 943 else if (flags.isSet(DYNAMIC_DATA)) 944 delete data; 945 946 flags.clear(STATIC_DATA|DYNAMIC_DATA|ARRAY_DATA); 947 data = NULL; 948 } 949 |
950 /** Allocate memory for the packet. */ |
951 void 952 allocate() 953 { |
954 assert(flags.noneSet(STATIC_DATA|DYNAMIC_DATA)); 955 flags.set(DYNAMIC_DATA|ARRAY_DATA); 956 data = new uint8_t[getSize()]; 957 } 958 959 /** 960 * Check a functional request against a memory value represented 961 * by a base/size pair and an associated data array. If the --- 52 unchanged lines hidden --- |