xref: /reactos/sdk/include/reactos/drivers/xbox/xgpu.h (revision 2a77e359)
1 /*
2  * PROJECT:     Original Xbox onboard hardware
3  * LICENSE:     GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE:     nVidia NV2A (XGPU) header file
5  * COPYRIGHT:   Copyright 2020 Stanislav Motylkov (x86corez@gmail.com)
6  */
7 
8 #ifndef _XGPU_H_
9 #define _XGPU_H_
10 
11 #pragma once
12 
13 /*
14  * Registers and definitions
15  */
16 #define NV2A_VIDEO_MEMORY_SIZE  (4 * 1024 * 1024) /* FIXME: obtain fb size from firmware somehow (Cromwell reserves high 4 MB of RAM) */
17 
18 #define NV2A_FB_OFFSET                 0x100000
19 #define   NV2A_FB_CFG0                   (0x200 + NV2A_FB_OFFSET)
20 #define NV2A_CRTC_OFFSET               0x600000
21 #define   NV2A_CRTC_FRAMEBUFFER_START    (0x800 + NV2A_CRTC_OFFSET)
22 #define   NV2A_CRTC_REGISTER_INDEX      (0x13D4 + NV2A_CRTC_OFFSET)
23 #define   NV2A_CRTC_REGISTER_VALUE      (0x13D5 + NV2A_CRTC_OFFSET)
24 #define NV2A_RAMDAC_OFFSET             0x680000
25 #define   NV2A_RAMDAC_FP_HVALID_END      (0x838 + NV2A_RAMDAC_OFFSET)
26 #define   NV2A_RAMDAC_FP_VVALID_END      (0x818 + NV2A_RAMDAC_OFFSET)
27 
28 #endif /* _XGPU_H_ */
29