request.hh (9911:676d3dcf1cc2) | request.hh (9912:3de4393f5649) |
---|---|
1/* 2 * Copyright (c) 2012 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 --- 72 unchanged lines hidden (view full) --- 81 82typedef Request* RequestPtr; 83typedef uint16_t MasterID; 84 85class Request 86{ 87 public: 88 typedef uint32_t FlagsType; | 1/* 2 * Copyright (c) 2012 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 --- 72 unchanged lines hidden (view full) --- 81 82typedef Request* RequestPtr; 83typedef uint16_t MasterID; 84 85class Request 86{ 87 public: 88 typedef uint32_t FlagsType; |
89 typedef uint8_t ArchFlagsType; |
|
89 typedef ::Flags<FlagsType> Flags; 90 | 90 typedef ::Flags<FlagsType> Flags; 91 |
91 /** ASI information for this request if it exists. */ 92 static const FlagsType ASI_BITS = 0x000000FF; | 92 /** 93 * Architecture specific flags. 94 * 95 * These bits int the flag field are reserved for 96 * architecture-specific code. For example, SPARC uses them to 97 * represent ASIs. 98 */ 99 static const FlagsType ARCH_BITS = 0x000000FF; |
93 /** The request was an instruction fetch. */ 94 static const FlagsType INST_FETCH = 0x00000100; 95 /** The virtual address is also the physical address. */ 96 static const FlagsType PHYSICAL = 0x00000200; 97 /** The request is an ALPHA VPTE pal access (hw_ld). */ 98 static const FlagsType VPTE = 0x00000400; 99 /** Use the alternate mode bits in ALPHA. */ 100 static const FlagsType ALTMODE = 0x00000800; --- 316 unchanged lines hidden (view full) --- 417 setFlags() and not just flags(). */ 418 void 419 setFlags(Flags flags) 420 { 421 assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR)); 422 _flags.set(flags); 423 } 424 | 100 /** The request was an instruction fetch. */ 101 static const FlagsType INST_FETCH = 0x00000100; 102 /** The virtual address is also the physical address. */ 103 static const FlagsType PHYSICAL = 0x00000200; 104 /** The request is an ALPHA VPTE pal access (hw_ld). */ 105 static const FlagsType VPTE = 0x00000400; 106 /** Use the alternate mode bits in ALPHA. */ 107 static const FlagsType ALTMODE = 0x00000800; --- 316 unchanged lines hidden (view full) --- 424 setFlags() and not just flags(). */ 425 void 426 setFlags(Flags flags) 427 { 428 assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR)); 429 _flags.set(flags); 430 } 431 |
432 void 433 setArchFlags(Flags flags) 434 { 435 assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR)); 436 _flags.set(flags & ARCH_BITS); 437 } 438 |
|
425 /** Accessor function for vaddr.*/ 426 Addr 427 getVaddr() 428 { 429 assert(privateFlags.isSet(VALID_VADDR)); 430 return _vaddr; 431 } 432 --- 14 unchanged lines hidden (view full) --- 447 448 /** Accessor function for asid.*/ 449 void 450 setAsid(int asid) 451 { 452 _asid = asid; 453 } 454 | 439 /** Accessor function for vaddr.*/ 440 Addr 441 getVaddr() 442 { 443 assert(privateFlags.isSet(VALID_VADDR)); 444 return _vaddr; 445 } 446 --- 14 unchanged lines hidden (view full) --- 461 462 /** Accessor function for asid.*/ 463 void 464 setAsid(int asid) 465 { 466 _asid = asid; 467 } 468 |
455 /** Accessor function for asi.*/ 456 uint8_t 457 getAsi() | 469 /** Accessor function for architecture-specific flags.*/ 470 ArchFlagsType 471 getArchFlags() |
458 { | 472 { |
459 assert(privateFlags.isSet(VALID_VADDR)); 460 return _flags & ASI_BITS; | 473 assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR)); 474 return _flags & ARCH_BITS; |
461 } 462 463 /** Accessor function to check if sc result is valid. */ 464 bool 465 extraDataValid() 466 { 467 return privateFlags.isSet(VALID_EXTRA_DATA); 468 } --- 67 unchanged lines hidden --- | 475 } 476 477 /** Accessor function to check if sc result is valid. */ 478 bool 479 extraDataValid() 480 { 481 return privateFlags.isSet(VALID_EXTRA_DATA); 482 } --- 67 unchanged lines hidden --- |