gem5  v22.1.0.0
amdgpu_defines.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 Advanced Micro Devices, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  *
15  * 3. Neither the name of the copyright holder nor the names of its
16  * contributors may be used to endorse or promote products derived from this
17  * software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef __DEV_AMDGPU_AMDGPU_DEFINES_HH__
33 #define __DEV_AMDGPU_AMDGPU_DEFINES_HH__
34 
35 #include "base/types.hh"
36 
37 namespace gem5
38 {
39 
40 /* Types of queues supported by device */
42 {
44  Gfx,
49  RLC
50 };
51 
52 // AMD GPUs support 16 different virtual address spaces
53 static constexpr int AMDGPU_VM_COUNT = 16;
54 
55 /* Names of BARs used by the device. */
56 constexpr int FRAMEBUFFER_BAR = 0;
57 constexpr int DOORBELL_BAR = 2;
58 constexpr int MMIO_BAR = 5;
59 
60 /* By default the X86 kernel expects the vga ROM at 0xc0000. */
61 constexpr uint32_t VGA_ROM_DEFAULT = 0xc0000;
62 constexpr uint32_t ROM_SIZE = 0x20000; // 128kB
63 
64 /* SDMA base, size, mmio offset shift. */
65 static constexpr uint32_t SDMA0_BASE = 0x4980;
66 static constexpr uint32_t SDMA1_BASE = 0x5180;
67 static constexpr uint32_t SDMA_SIZE = 0x800;
68 static constexpr uint32_t SDMA_OFFSET_SHIFT = 2;
69 
70 /* Interrupt handler base, size, mmio offset shift. */
71 static constexpr uint32_t IH_BASE = 0x4280;
72 static constexpr uint32_t IH_SIZE = 0x700;
73 static constexpr uint32_t IH_OFFSET_SHIFT = 2;
74 
75 /* Graphics register bus manager base, size, mmio offset shift. */
76 static constexpr uint32_t GRBM_BASE = 0x8000;
77 static constexpr uint32_t GRBM_SIZE = 0x5000;
78 static constexpr uint32_t GRBM_OFFSET_SHIFT = 2;
79 
80 /* GFX base, size, mmio offset shift. */
81 static constexpr uint32_t GFX_BASE = 0x28000;
82 static constexpr uint32_t GFX_SIZE = 0x17000;
83 static constexpr uint32_t GFX_OFFSET_SHIFT = 2;
84 
85 /* MMHUB base, size, mmio offset shift. */
86 static constexpr uint32_t MMHUB_BASE = 0x68000;
87 static constexpr uint32_t MMHUB_SIZE = 0x2120;
88 static constexpr uint32_t MMHUB_OFFSET_SHIFT = 2;
89 
90 /* NBIO base and size. */
91 static constexpr uint32_t NBIO_BASE = 0x0;
92 static constexpr uint32_t NBIO_SIZE = 0x4280;
93 
94 } // namespace gem5
95 
96 #endif // __DEV_AMDGPU_AMDGPU_DEFINES_HH__
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
static constexpr uint32_t MMHUB_SIZE
static constexpr uint32_t SDMA_SIZE
static constexpr uint32_t GFX_BASE
constexpr int MMIO_BAR
@ InterruptHandler
@ ComputeAQL
static constexpr uint32_t NBIO_SIZE
constexpr uint32_t ROM_SIZE
static constexpr uint32_t IH_OFFSET_SHIFT
static constexpr uint32_t MMHUB_BASE
static constexpr uint32_t SDMA0_BASE
static constexpr uint32_t GRBM_BASE
static constexpr uint32_t SDMA1_BASE
static constexpr uint32_t MMHUB_OFFSET_SHIFT
static constexpr int AMDGPU_VM_COUNT
static constexpr uint32_t SDMA_OFFSET_SHIFT
constexpr int FRAMEBUFFER_BAR
static constexpr uint32_t IH_BASE
static constexpr uint32_t GRBM_SIZE
static constexpr uint32_t GFX_OFFSET_SHIFT
constexpr int DOORBELL_BAR
static constexpr uint32_t NBIO_BASE
constexpr uint32_t VGA_ROM_DEFAULT
static constexpr uint32_t GFX_SIZE
static constexpr uint32_t IH_SIZE
static constexpr uint32_t GRBM_OFFSET_SHIFT

Generated on Wed Dec 21 2022 10:22:32 for gem5 by doxygen 1.9.1