-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathintel_reg.h
More file actions
3818 lines (3406 loc) · 120 KB
/
intel_reg.h
File metadata and controls
3818 lines (3406 loc) · 120 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h,v 1.13 2003/02/06 04:18:04 dawes Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sub license, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/** @file
* Register names and fields for Intel graphics.
*/
/*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
* Eric Anholt <eric@anholt.net>
*
* based on the i740 driver by
* Kevin E. Martin <kevin@precisioninsight.com>
*
*
*/
#ifndef _I810_REG_H
#define _I810_REG_H
/* I/O register offsets
*/
#define SRX 0x3C4 /* p208 */
#define GRX 0x3CE /* p213 */
#define ARX 0x3C0 /* p224 */
/* VGA Color Palette Registers */
#define DACMASK 0x3C6 /* p232 */
#define DACSTATE 0x3C7 /* p232 */
#define DACRX 0x3C7 /* p233 */
#define DACWX 0x3C8 /* p233 */
#define DACDATA 0x3C9 /* p233 */
/* CRT Controller Registers (CRX) */
#define START_ADDR_HI 0x0C /* p246 */
#define START_ADDR_LO 0x0D /* p247 */
#define VERT_SYNC_END 0x11 /* p249 */
#define EXT_VERT_TOTAL 0x30 /* p257 */
#define EXT_VERT_DISPLAY 0x31 /* p258 */
#define EXT_VERT_SYNC_START 0x32 /* p259 */
#define EXT_VERT_BLANK_START 0x33 /* p260 */
#define EXT_HORIZ_TOTAL 0x35 /* p261 */
#define EXT_HORIZ_BLANK 0x39 /* p261 */
#define EXT_START_ADDR 0x40 /* p262 */
#define EXT_START_ADDR_ENABLE 0x80
#define EXT_OFFSET 0x41 /* p263 */
#define EXT_START_ADDR_HI 0x42 /* p263 */
#define INTERLACE_CNTL 0x70 /* p264 */
#define INTERLACE_ENABLE 0x80
#define INTERLACE_DISABLE 0x00
/* Miscellaneous Output Register
*/
#define MSR_R 0x3CC /* p207 */
#define MSR_W 0x3C2 /* p207 */
#define IO_ADDR_SELECT 0x01
#define MDA_BASE 0x3B0 /* p207 */
#define CGA_BASE 0x3D0 /* p207 */
/* CR80 - IO Control, p264
*/
#define IO_CTNL 0x80
#define EXTENDED_ATTR_CNTL 0x02
#define EXTENDED_CRTC_CNTL 0x01
/* GR10 - Address mapping, p221
*/
#define ADDRESS_MAPPING 0x10
#define PAGE_TO_LOCAL_MEM_ENABLE 0x10
#define GTT_MEM_MAP_ENABLE 0x08
#define PACKED_MODE_ENABLE 0x04
#define LINEAR_MODE_ENABLE 0x02
#define PAGE_MAPPING_ENABLE 0x01
#define HOTKEY_VBIOS_SWITCH_BLOCK 0x80
#define HOTKEY_SWITCH 0x20
#define HOTKEY_TOGGLE 0x10
/* Blitter control, p378
*/
#define BITBLT_CNTL 0x7000c
#define COLEXP_MODE 0x30
#define COLEXP_8BPP 0x00
#define COLEXP_16BPP 0x10
#define COLEXP_24BPP 0x20
#define COLEXP_RESERVED 0x30
#define BITBLT_STATUS 0x01
#define CHDECMISC 0x10111
#define DCC 0x10200
#define C0DRB0 0x10200
#define C0DRB1 0x10202
#define C0DRB2 0x10204
#define C0DRB3 0x10206
#define C0DRA01 0x10208
#define C0DRA23 0x1020a
#define C1DRB0 0x10600
#define C1DRB1 0x10602
#define C1DRB2 0x10604
#define C1DRB3 0x10606
#define C1DRA01 0x10608
#define C1DRA23 0x1060a
/* p375.
*/
#define DISPLAY_CNTL 0x70008
#define VGA_WRAP_MODE 0x02
#define VGA_WRAP_AT_256KB 0x00
#define VGA_NO_WRAP 0x02
#define GUI_MODE 0x01
#define STANDARD_VGA_MODE 0x00
#define HIRES_MODE 0x01
/* p375
*/
#define PIXPIPE_CONFIG_0 0x70009
#define DAC_8_BIT 0x80
#define DAC_6_BIT 0x00
#define HW_CURSOR_ENABLE 0x10
#define EXTENDED_PALETTE 0x01
/* p375
*/
#define PIXPIPE_CONFIG_1 0x7000a
#define DISPLAY_COLOR_MODE 0x0F
#define DISPLAY_VGA_MODE 0x00
#define DISPLAY_8BPP_MODE 0x02
#define DISPLAY_15BPP_MODE 0x04
#define DISPLAY_16BPP_MODE 0x05
#define DISPLAY_24BPP_MODE 0x06
#define DISPLAY_32BPP_MODE 0x07
/* p375
*/
#define PIXPIPE_CONFIG_2 0x7000b
#define DISPLAY_GAMMA_ENABLE 0x08
#define DISPLAY_GAMMA_DISABLE 0x00
#define OVERLAY_GAMMA_ENABLE 0x04
#define OVERLAY_GAMMA_DISABLE 0x00
/* p380
*/
#define DISPLAY_BASE 0x70020
#define DISPLAY_BASE_MASK 0x03fffffc
/* Cursor control registers, pp383-384
*/
/* Desktop (845G, 865G) */
#define CURSOR_CONTROL 0x70080
#define CURSOR_ENABLE 0x80000000
#define CURSOR_GAMMA_ENABLE 0x40000000
#define CURSOR_STRIDE_MASK 0x30000000
#define CURSOR_FORMAT_SHIFT 24
#define CURSOR_FORMAT_MASK (0x07 << CURSOR_FORMAT_SHIFT)
#define CURSOR_FORMAT_2C (0x00 << CURSOR_FORMAT_SHIFT)
#define CURSOR_FORMAT_3C (0x01 << CURSOR_FORMAT_SHIFT)
#define CURSOR_FORMAT_4C (0x02 << CURSOR_FORMAT_SHIFT)
#define CURSOR_FORMAT_ARGB (0x04 << CURSOR_FORMAT_SHIFT)
#define CURSOR_FORMAT_XRGB (0x05 << CURSOR_FORMAT_SHIFT)
/* Mobile and i810 */
#define CURSOR_A_CONTROL CURSOR_CONTROL
#define CURSOR_ORIGIN_SCREEN 0x00 /* i810 only */
#define CURSOR_ORIGIN_DISPLAY 0x1 /* i810 only */
#define CURSOR_MODE 0x27
#define CURSOR_MODE_DISABLE 0x00
#define CURSOR_MODE_32_4C_AX 0x01 /* i810 only */
#define CURSOR_MODE_64_3C 0x04
#define CURSOR_MODE_64_4C_AX 0x05
#define CURSOR_MODE_64_4C 0x06
#define CURSOR_MODE_64_32B_AX 0x07
#define CURSOR_MODE_64_ARGB_AX (0x20 | CURSOR_MODE_64_32B_AX)
#define MCURSOR_PIPE_SELECT (1 << 28)
#define MCURSOR_PIPE_A 0x00
#define MCURSOR_PIPE_B (1 << 28)
#define MCURSOR_GAMMA_ENABLE (1 << 26)
#define MCURSOR_MEM_TYPE_LOCAL (1 << 25)
#define CURSOR_BASEADDR 0x70084
#define CURSOR_A_BASE CURSOR_BASEADDR
#define CURSOR_BASEADDR_MASK 0x1FFFFF00
#define CURSOR_A_POSITION 0x70088
#define CURSOR_POS_SIGN 0x8000
#define CURSOR_POS_MASK 0x007FF
#define CURSOR_X_SHIFT 0
#define CURSOR_Y_SHIFT 16
#define CURSOR_X_LO 0x70088
#define CURSOR_X_HI 0x70089
#define CURSOR_X_POS 0x00
#define CURSOR_X_NEG 0x80
#define CURSOR_Y_LO 0x7008A
#define CURSOR_Y_HI 0x7008B
#define CURSOR_Y_POS 0x00
#define CURSOR_Y_NEG 0x80
#define CURSOR_A_PALETTE0 0x70090
#define CURSOR_A_PALETTE1 0x70094
#define CURSOR_A_PALETTE2 0x70098
#define CURSOR_A_PALETTE3 0x7009C
#define CURSOR_SIZE 0x700A0
#define CURSOR_SIZE_MASK 0x3FF
#define CURSOR_SIZE_HSHIFT 0
#define CURSOR_SIZE_VSHIFT 12
#define CURSOR_B_CONTROL 0x700C0
#define CURSOR_B_BASE 0x700C4
#define CURSOR_B_POSITION 0x700C8
#define CURSOR_B_PALETTE0 0x700D0
#define CURSOR_B_PALETTE1 0x700D4
#define CURSOR_B_PALETTE2 0x700D8
#define CURSOR_B_PALETTE3 0x700DC
/* Similar registers exist in Device 0 on the i810 (pp55-65), but I'm
* not sure they refer to local (graphics) memory.
*
* These details are for the local memory control registers,
* (pp301-310). The test machines are not equiped with local memory,
* so nothing is tested. Only a single row seems to be supported.
*/
#define DRAM_ROW_TYPE 0x3000
#define DRAM_ROW_0 0x01
#define DRAM_ROW_0_SDRAM 0x01
#define DRAM_ROW_0_EMPTY 0x00
#define DRAM_ROW_CNTL_LO 0x3001
#define DRAM_PAGE_MODE_CTRL 0x10
#define DRAM_RAS_TO_CAS_OVRIDE 0x08
#define DRAM_CAS_LATENCY 0x04
#define DRAM_RAS_TIMING 0x02
#define DRAM_RAS_PRECHARGE 0x01
#define DRAM_ROW_CNTL_HI 0x3002
#define DRAM_REFRESH_RATE 0x18
#define DRAM_REFRESH_DISABLE 0x00
#define DRAM_REFRESH_60HZ 0x08
#define DRAM_REFRESH_FAST_TEST 0x10
#define DRAM_REFRESH_RESERVED 0x18
#define DRAM_SMS 0x07
#define DRAM_SMS_NORMAL 0x00
#define DRAM_SMS_NOP_ENABLE 0x01
#define DRAM_SMS_ABPCE 0x02
#define DRAM_SMS_MRCE 0x03
#define DRAM_SMS_CBRCE 0x04
/* p307
*/
#define DPMS_SYNC_SELECT 0x5002
#define VSYNC_CNTL 0x08
#define VSYNC_ON 0x00
#define VSYNC_OFF 0x08
#define HSYNC_CNTL 0x02
#define HSYNC_ON 0x00
#define HSYNC_OFF 0x02
#define GPIOA 0x5010
#define GPIOB 0x5014
#define GPIOC 0x5018
#define GPIOD 0x501c
#define GPIOE 0x5020
#define GPIOF 0x5024
#define GPIOG 0x5028
#define GPIOH 0x502c
# define GPIO_CLOCK_DIR_MASK (1 << 0)
# define GPIO_CLOCK_DIR_IN (0 << 1)
# define GPIO_CLOCK_DIR_OUT (1 << 1)
# define GPIO_CLOCK_VAL_MASK (1 << 2)
# define GPIO_CLOCK_VAL_OUT (1 << 3)
# define GPIO_CLOCK_VAL_IN (1 << 4)
# define GPIO_CLOCK_PULLUP_DISABLE (1 << 5)
# define GPIO_DATA_DIR_MASK (1 << 8)
# define GPIO_DATA_DIR_IN (0 << 9)
# define GPIO_DATA_DIR_OUT (1 << 9)
# define GPIO_DATA_VAL_MASK (1 << 10)
# define GPIO_DATA_VAL_OUT (1 << 11)
# define GPIO_DATA_VAL_IN (1 << 12)
# define GPIO_DATA_PULLUP_DISABLE (1 << 13)
/* GMBus registers for hardware-assisted (non-bitbanging) I2C access */
#define GMBUS0 0x5100
#define GMBUS1 0x5104
#define GMBUS2 0x5108
#define GMBUS3 0x510c
#define GMBUS4 0x5110
#define GMBUS5 0x5120
/* p317, 319
*/
#define VCLK2_VCO_M 0x6008 /* treat as 16 bit? (includes msbs) */
#define VCLK2_VCO_N 0x600a
#define VCLK2_VCO_DIV_SEL 0x6012
#define VCLK_DIVISOR_VGA0 0x6000
#define VCLK_DIVISOR_VGA1 0x6004
#define VCLK_POST_DIV 0x6010
/** Selects a post divisor of 4 instead of 2. */
# define VGA1_PD_P2_DIV_4 (1 << 15)
/** Overrides the p2 post divisor field */
# define VGA1_PD_P1_DIV_2 (1 << 13)
# define VGA1_PD_P1_SHIFT 8
/** P1 value is 2 greater than this field */
# define VGA1_PD_P1_MASK (0x1f << 8)
/** Selects a post divisor of 4 instead of 2. */
# define VGA0_PD_P2_DIV_4 (1 << 7)
/** Overrides the p2 post divisor field */
# define VGA0_PD_P1_DIV_2 (1 << 5)
# define VGA0_PD_P1_SHIFT 0
/** P1 value is 2 greater than this field */
# define VGA0_PD_P1_MASK (0x1f << 0)
#define POST_DIV_SELECT 0x70
#define POST_DIV_1 0x00
#define POST_DIV_2 0x10
#define POST_DIV_4 0x20
#define POST_DIV_8 0x30
#define POST_DIV_16 0x40
#define POST_DIV_32 0x50
#define VCO_LOOP_DIV_BY_4M 0x00
#define VCO_LOOP_DIV_BY_16M 0x04
/* Instruction Parser Mode Register
* - p281
* - 2 new bits.
*/
#define INST_PM 0x20c0
#define AGP_SYNC_PACKET_FLUSH_ENABLE 0x20 /* reserved */
#define SYNC_PACKET_FLUSH_ENABLE 0x10
#define TWO_D_INST_DISABLE 0x08
#define THREE_D_INST_DISABLE 0x04
#define STATE_VAR_UPDATE_DISABLE 0x02
#define PAL_STIP_DISABLE 0x01
#define GEN6_GLOBAL_DEBUG_ENABLE 0x10
#define MEMMODE 0x20dc
/* Instruction parser error register. p279
*/
#define IPEIR 0x2088
#define IPEHR 0x208C
#define INST_DONE 0x2090
# define IDCT_DONE (1 << 30)
# define IQ_DONE (1 << 29)
# define PR_DONE (1 << 28)
# define VLD_DONE (1 << 27)
# define IP_DONE (1 << 26)
# define FBC_DONE (1 << 25)
# define BINNER_DONE (1 << 24)
# define SF_DONE (1 << 23)
# define SE_DONE (1 << 22)
# define WM_DONE (1 << 21)
# define IZ_DONE (1 << 20)
# define PERSPECTIVE_INTERP_DONE (1 << 19)
# define DISPATCHER_DONE (1 << 18)
# define PROJECTION_DONE (1 << 17)
# define DEPENDENT_ADDRESS_DONE (1 << 16)
# define QUAD_CACHE_DONE (1 << 15)
# define TEXTURE_FETCH_DONE (1 << 14)
# define TEXTURE_DECOMPRESS_DONE (1 << 13)
# define SAMPLER_CACHE_DONE (1 << 12)
# define FILTER_DONE (1 << 11)
# define BYPASS_FIFO_DONE (1 << 10)
# define PS_DONE (1 << 9)
# define CC_DONE (1 << 8)
# define MAP_FILTER_DONE (1 << 7)
# define MAP_L2_IDLE (1 << 6)
# define RING_2_ENABLE (1 << 2)
# define RING_1_ENABLE (1 << 1)
# define RING_0_ENABLE (1 << 0)
# define I830_GMBUS_DONE (1 << 26)
# define I830_FBC_DONE (1 << 25)
# define I830_BINNER_DONE (1 << 24)
# define I830_MPEG_DONE (1 << 23)
# define I830_MECO_DONE (1 << 22)
# define I830_MCD_DONE (1 << 21)
# define I830_MCSTP_DONE (1 << 20)
# define I830_CC_DONE (1 << 19)
# define I830_DG_DONE (1 << 18)
# define I830_DCMP_DONE (1 << 17)
# define I830_FTCH_DONE (1 << 16)
# define I830_IT_DONE (1 << 15)
# define I830_MG_DONE (1 << 14)
# define I830_MEC_DONE (1 << 13)
# define I830_PC_DONE (1 << 12)
# define I830_QCC_DONE (1 << 11)
# define I830_TB_DONE (1 << 10)
# define I830_WM_DONE (1 << 9)
# define I830_EF_DONE (1 << 8)
# define I830_BLITTER_DONE (1 << 7)
# define I830_MAP_L2_DONE (1 << 6)
# define I830_SECONDARY_RING_3_DONE (1 << 5)
# define I830_SECONDARY_RING_2_DONE (1 << 4)
# define I830_SECONDARY_RING_1_DONE (1 << 3)
# define I830_SECONDARY_RING_0_DONE (1 << 2)
# define I830_PRIMARY_RING_1_DONE (1 << 1)
# define I830_PRIMARY_RING_0_DONE (1 << 0)
#define NOP_ID 0x2094
#define SCPD0 0x209c /* debug */
#define INST_PS 0x20c4
#define IPEIR_I965 0x2064 /* i965 */
#define IPEHR_I965 0x2068 /* i965 */
#define INST_DONE_I965 0x206c
# define I965_ROW_0_EU_0_DONE (1 << 31)
# define I965_ROW_0_EU_1_DONE (1 << 30)
# define I965_ROW_0_EU_2_DONE (1 << 29)
# define I965_ROW_0_EU_3_DONE (1 << 28)
# define I965_ROW_1_EU_0_DONE (1 << 27)
# define I965_ROW_1_EU_1_DONE (1 << 26)
# define I965_ROW_1_EU_2_DONE (1 << 25)
# define I965_ROW_1_EU_3_DONE (1 << 24)
# define I965_SF_DONE (1 << 23)
# define I965_SE_DONE (1 << 22)
# define I965_WM_DONE (1 << 21)
# define I965_DISPATCHER_DONE (1 << 18)
# define I965_PROJECTION_DONE (1 << 17)
# define I965_DG_DONE (1 << 16)
# define I965_QUAD_CACHE_DONE (1 << 15)
# define I965_TEXTURE_FETCH_DONE (1 << 14)
# define I965_TEXTURE_DECOMPRESS_DONE (1 << 13)
# define I965_SAMPLER_CACHE_DONE (1 << 12)
# define I965_FILTER_DONE (1 << 11)
# define I965_BYPASS_DONE (1 << 10)
# define I965_PS_DONE (1 << 9)
# define I965_CC_DONE (1 << 8)
# define I965_MAP_FILTER_DONE (1 << 7)
# define I965_MAP_L2_IDLE (1 << 6)
# define I965_MA_ROW_0_DONE (1 << 5)
# define I965_MA_ROW_1_DONE (1 << 4)
# define I965_IC_ROW_0_DONE (1 << 3)
# define I965_IC_ROW_1_DONE (1 << 2)
# define I965_CP_DONE (1 << 1)
# define I965_RING_0_ENABLE (1 << 0)
# define ILK_ROW_0_EU_0_DONE (1 << 31)
# define ILK_ROW_0_EU_1_DONE (1 << 30)
# define ILK_ROW_0_EU_2_DONE (1 << 29)
# define ILK_ROW_0_EU_3_DONE (1 << 28)
# define ILK_ROW_1_EU_0_DONE (1 << 27)
# define ILK_ROW_1_EU_1_DONE (1 << 26)
# define ILK_ROW_1_EU_2_DONE (1 << 25)
# define ILK_ROW_1_EU_3_DONE (1 << 24)
# define ILK_ROW_2_EU_0_DONE (1 << 23)
# define ILK_ROW_2_EU_1_DONE (1 << 22)
# define ILK_ROW_2_EU_2_DONE (1 << 21)
# define ILK_ROW_2_EU_3_DONE (1 << 20)
# define ILK_VCP_DONE (1 << 19)
# define ILK_ROW_0_MATH_DONE (1 << 18)
# define ILK_ROW_1_MATH_DONE (1 << 17)
# define ILK_ROW_2_MATH_DONE (1 << 16)
# define ILK_VC1_DONE (1 << 15)
# define ILK_ROW_0_MA_DONE (1 << 14)
# define ILK_ROW_1_MA_DONE (1 << 13)
# define ILK_ROW_2_MA_DONE (1 << 12)
# define ILK_ROW_0_ISC_DONE (1 << 11)
# define ILK_ROW_1_ISC_DONE (1 << 10)
# define ILK_ROW_2_ISC_DONE (1 << 9)
# define ILK_VFE_DONE (1 << 8)
# define ILK_TD_DONE (1 << 7)
# define ILK_SVTS_DONE (1 << 6)
# define ILK_TS_DONE (1 << 5)
# define ILK_GW_DONE (1 << 4)
# define ILK_AI_DONE (1 << 3)
# define ILK_AC_DONE (1 << 2)
# define ILK_AM_DONE (1 << 1)
#define GEN6_INSTDONE_1 0x206c
# define GEN6_MA_3_DONE (1 << 31)
# define GEN6_EU_32_DONE (1 << 30)
# define GEN6_EU_31_DONE (1 << 29)
# define GEN6_EU_30_DONE (1 << 28)
# define GEN6_MA_2_DONE (1 << 27)
# define GEN6_EU_22_DONE (1 << 26)
# define GEN6_EU_21_DONE (1 << 25)
# define GEN6_EU_20_DONE (1 << 24)
# define GEN6_MA_1_DONE (1 << 23)
# define GEN6_EU_12_DONE (1 << 22)
# define GEN6_EU_11_DONE (1 << 21)
# define GEN6_EU_10_DONE (1 << 20)
# define GEN6_MA_0_DONE (1 << 19)
# define GEN6_EU_02_DONE (1 << 18)
# define GEN6_EU_01_DONE (1 << 17)
# define GEN6_EU_00_DONE (1 << 16)
# define GEN6_IC_3_DONE (1 << 15)
# define GEN6_IC_2_DONE (1 << 14)
# define GEN6_IC_1_DONE (1 << 13)
# define GEN6_IC_0_DONE (1 << 12)
# define GEN6_ISC_10_DONE (1 << 11)
# define GEN6_ISC_32_DONE (1 << 10)
# define GEN6_VSC_DONE (1 << 9)
# define GEN6_IEF_DONE (1 << 8)
# define GEN6_VFE_DONE (1 << 7)
# define GEN6_TD_DONE (1 << 6)
# define GEN6_TS_DONE (1 << 4)
# define GEN6_GW_DONE (1 << 3)
# define GEN6_HIZ_DONE (1 << 2)
# define GEN6_AVS_DONE (1 << 1)
#define INST_PS_I965 0x2070
/* Current active ring head address:
*/
#define ACTHD_I965 0x2074
#define ACTHD 0x20C8
/* Current primary/secondary DMA fetch addresses:
*/
#define DMA_FADD_P 0x2078
#define DMA_FADD_S 0x20d4
#define INST_DONE_1 0x207c
# define I965_GW_CS_DONE_CR (1 << 19)
# define I965_SVSM_CS_DONE_CR (1 << 18)
# define I965_SVDW_CS_DONE_CR (1 << 17)
# define I965_SVDR_CS_DONE_CR (1 << 16)
# define I965_SVRW_CS_DONE_CR (1 << 15)
# define I965_SVRR_CS_DONE_CR (1 << 14)
# define I965_SVTW_CS_DONE_CR (1 << 13)
# define I965_MASM_CS_DONE_CR (1 << 12)
# define I965_MASF_CS_DONE_CR (1 << 11)
# define I965_MAW_CS_DONE_CR (1 << 10)
# define I965_EM1_CS_DONE_CR (1 << 9)
# define I965_EM0_CS_DONE_CR (1 << 8)
# define I965_UC1_CS_DONE (1 << 7)
# define I965_UC0_CS_DONE (1 << 6)
# define I965_URB_CS_DONE (1 << 5)
# define I965_ISC_CS_DONE (1 << 4)
# define I965_CL_CS_DONE (1 << 3)
# define I965_GS_CS_DONE (1 << 2)
# define I965_VS0_CS_DONE (1 << 1)
# define I965_VF_CS_DONE (1 << 0)
# define G4X_BCS_DONE (1 << 31)
# define G4X_CS_DONE (1 << 30)
# define G4X_MASF_DONE (1 << 29)
# define G4X_SVDW_DONE (1 << 28)
# define G4X_SVDR_DONE (1 << 27)
# define G4X_SVRW_DONE (1 << 26)
# define G4X_SVRR_DONE (1 << 25)
# define G4X_ISC_DONE (1 << 24)
# define G4X_MT_DONE (1 << 23)
# define G4X_RC_DONE (1 << 22)
# define G4X_DAP_DONE (1 << 21)
# define G4X_MAWB_DONE (1 << 20)
# define G4X_MT_IDLE (1 << 19)
# define G4X_GBLT_BUSY (1 << 18)
# define G4X_SVSM_DONE (1 << 17)
# define G4X_MASM_DONE (1 << 16)
# define G4X_QC_DONE (1 << 15)
# define G4X_FL_DONE (1 << 14)
# define G4X_SC_DONE (1 << 13)
# define G4X_DM_DONE (1 << 12)
# define G4X_FT_DONE (1 << 11)
# define G4X_DG_DONE (1 << 10)
# define G4X_SI_DONE (1 << 9)
# define G4X_SO_DONE (1 << 8)
# define G4X_PL_DONE (1 << 7)
# define G4X_WIZ_DONE (1 << 6)
# define G4X_URB_DONE (1 << 5)
# define G4X_SF_DONE (1 << 4)
# define G4X_CL_DONE (1 << 3)
# define G4X_GS_DONE (1 << 2)
# define G4X_VS0_DONE (1 << 1)
# define G4X_VF_DONE (1 << 0)
#define GEN6_INSTDONE_2 0x207c
# define GEN6_GAM_DONE (1 << 31)
# define GEN6_CS_DONE (1 << 30)
# define GEN6_WMBE_DONE (1 << 29)
# define GEN6_SVRW_DONE (1 << 28)
# define GEN6_RCC_DONE (1 << 27)
# define GEN6_SVG_DONE (1 << 26)
# define GEN6_ISC_DONE (1 << 25)
# define GEN6_MT_DONE (1 << 24)
# define GEN6_RCPFE_DONE (1 << 23)
# define GEN6_RCPBE_DONE (1 << 22)
# define GEN6_VDI_DONE (1 << 21)
# define GEN6_RCZ_DONE (1 << 20)
# define GEN6_DAP_DONE (1 << 19)
# define GEN6_PSD_DONE (1 << 18)
# define GEN6_IZ_DONE (1 << 17)
# define GEN6_WMFE_DONE (1 << 16)
# define GEN6_SVSM_DONE (1 << 15)
# define GEN6_QC_DONE (1 << 14)
# define GEN6_FL_DONE (1 << 13)
# define GEN6_SC_DONE (1 << 12)
# define GEN6_DM_DONE (1 << 11)
# define GEN6_FT_DONE (1 << 10)
# define GEN6_DG_DONE (1 << 9)
# define GEN6_SI_DONE (1 << 8)
# define GEN6_SO_DONE (1 << 7)
# define GEN6_PL_DONE (1 << 6)
# define GEN6_VME_DONE (1 << 5)
# define GEN6_SF_DONE (1 << 4)
# define GEN6_CL_DONE (1 << 3)
# define GEN6_GS_DONE (1 << 2)
# define GEN6_VS0_DONE (1 << 1)
# define GEN6_VF_DONE (1 << 0)
#define CACHE_MODE_0 0x2120
#define CACHE_MODE_1 0x2124
#define MI_MODE 0x209c
#define MI_DISPLAY_POWER_DOWN 0x20e0
#define MI_ARB_STATE 0x20e4
#define MI_RDRET_STATE 0x20fc
/* Start addresses for each of the primary rings:
*/
#define PR0_STR 0x20f0
#define PR1_STR 0x20f4
#define PR2_STR 0x20f8
#define WIZ_CTL 0x7c00
#define WIZ_CTL_SINGLE_SUBSPAN (1<<6)
#define WIZ_CTL_IGNORE_STALLS (1<<5)
#define SVG_WORK_CTL 0x7408
#define TS_CTL 0x7e00
#define TS_MUX_ERR_CODE (0<<8)
#define TS_MUX_URB_0 (1<<8)
#define TS_MUX_DISPATCH_ID_0 (10<<8)
#define TS_MUX_ERR_CODE_VALID (15<<8)
#define TS_MUX_TID_0 (16<<8)
#define TS_MUX_EUID_0 (18<<8)
#define TS_MUX_FFID_0 (22<<8)
#define TS_MUX_EOT (26<<8)
#define TS_MUX_SIDEBAND_0 (27<<8)
#define TS_SNAP_ALL_CHILD (1<<2)
#define TS_SNAP_ALL_ROOT (1<<1)
#define TS_SNAP_ENABLE (1<<0)
#define TS_DEBUG_DATA 0x7e0c
#define TD_CTL 0x8000
#define TD_CTL2 0x8004
#define ECOSKPD 0x21d0
#define EXCC 0x2028
/* I965 debug regs:
*/
#define IA_VERTICES_COUNT_QW 0x2310
#define IA_PRIMITIVES_COUNT_QW 0x2318
#define VS_INVOCATION_COUNT_QW 0x2320
#define GS_INVOCATION_COUNT_QW 0x2328
#define GS_PRIMITIVES_COUNT_QW 0x2330
#define CL_INVOCATION_COUNT_QW 0x2338
#define CL_PRIMITIVES_COUNT_QW 0x2340
#define PS_INVOCATION_COUNT_QW 0x2348
#define PS_DEPTH_COUNT_QW 0x2350
#define TIMESTAMP_QW 0x2358
#define CLKCMP_QW 0x2360
/* General error reporting regs, p296
*/
#define EIR 0x20B0
#define EMR 0x20B4
#define ESR 0x20B8
# define ERR_VERTEX_MAX (1 << 5) /* lpt/cst */
# define ERR_PGTBL_ERROR (1 << 4)
# define ERR_DISPLAY_OVERLAY_UNDERRUN (1 << 3)
# define ERR_MAIN_MEMORY_REFRESH (1 << 1)
# define ERR_INSTRUCTION_ERROR (1 << 0)
/* Interrupt Control Registers
* - new bits for i810
* - new register hwstam (mask)
*/
#define HWS_PGA 0x2080
#define PWRCTXA 0x2088 /* 965GM+ only */
#define PWRCTX_EN (1<<0)
#define HWSTAM 0x2098 /* p290 */
#define IER 0x20a0 /* p291 */
#define IIR 0x20a4 /* p292 */
#define IMR 0x20a8 /* p293 */
#define ISR 0x20ac /* p294 */
#define HW_ERROR 0x8000
#define SYNC_STATUS_TOGGLE 0x1000
#define DPY_0_FLIP_PENDING 0x0800
#define DPY_1_FLIP_PENDING 0x0400 /* not implemented on i810 */
#define OVL_0_FLIP_PENDING 0x0200
#define OVL_1_FLIP_PENDING 0x0100 /* not implemented on i810 */
#define DPY_0_VBLANK 0x0080
#define DPY_0_EVENT 0x0040
#define DPY_1_VBLANK 0x0020 /* not implemented on i810 */
#define DPY_1_EVENT 0x0010 /* not implemented on i810 */
#define HOST_PORT_EVENT 0x0008 /* */
#define CAPTURE_EVENT 0x0004 /* */
#define USER_DEFINED 0x0002
#define BREAKPOINT 0x0001
#define INTR_RESERVED (0x6000 | \
DPY_1_FLIP_PENDING | \
OVL_1_FLIP_PENDING | \
DPY_1_VBLANK | \
DPY_1_EVENT | \
HOST_PORT_EVENT | \
CAPTURE_EVENT )
/* FIFO Watermark and Burst Length Control Register
*
* - different offset and contents on i810 (p299) (fewer bits per field)
* - some overlay fields added
* - what does it all mean?
*/
#define FWATER_BLC 0x20d8
#define FWATER_BLC2 0x20dc
#define MM_BURST_LENGTH 0x00700000
#define MM_FIFO_WATERMARK 0x0001F000
#define LM_BURST_LENGTH 0x00000700
#define LM_FIFO_WATERMARK 0x0000001F
/* Fence/Tiling ranges [0..7]
*/
#define FENCE 0x2000
#define FENCE_NR 8
#define FENCE_NEW 0x3000
#define FENCE_NEW_NR 16
#define FENCE_LINEAR 0
#define FENCE_XMAJOR 1
#define FENCE_YMAJOR 2
#define I915G_FENCE_START_MASK 0x0ff00000
#define I830_FENCE_START_MASK 0x07f80000
#define FENCE_START_MASK 0x03F80000
#define FENCE_X_MAJOR 0x00000000
#define FENCE_Y_MAJOR 0x00001000
#define FENCE_SIZE_MASK 0x00000700
#define FENCE_SIZE_512K 0x00000000
#define FENCE_SIZE_1M 0x00000100
#define FENCE_SIZE_2M 0x00000200
#define FENCE_SIZE_4M 0x00000300
#define FENCE_SIZE_8M 0x00000400
#define FENCE_SIZE_16M 0x00000500
#define FENCE_SIZE_32M 0x00000600
#define FENCE_SIZE_64M 0x00000700
#define I915G_FENCE_SIZE_1M 0x00000000
#define I915G_FENCE_SIZE_2M 0x00000100
#define I915G_FENCE_SIZE_4M 0x00000200
#define I915G_FENCE_SIZE_8M 0x00000300
#define I915G_FENCE_SIZE_16M 0x00000400
#define I915G_FENCE_SIZE_32M 0x00000500
#define I915G_FENCE_SIZE_64M 0x00000600
#define I915G_FENCE_SIZE_128M 0x00000700
#define I965_FENCE_X_MAJOR 0x00000000
#define I965_FENCE_Y_MAJOR 0x00000002
#define FENCE_PITCH_1 0x00000000
#define FENCE_PITCH_2 0x00000010
#define FENCE_PITCH_4 0x00000020
#define FENCE_PITCH_8 0x00000030
#define FENCE_PITCH_16 0x00000040
#define FENCE_PITCH_32 0x00000050
#define FENCE_PITCH_64 0x00000060
#define FENCE_VALID 0x00000001
#define FENCE_REG_SANDYBRIDGE_0 0x100000
/* Registers to control page table, p274
*/
#define PGETBL_CTL 0x2020
#define PGETBL_ADDR_MASK 0xFFFFF000
#define PGETBL_ENABLE_MASK 0x00000001
#define PGETBL_ENABLED 0x00000001
/** Added in 965G, this field has the actual size of the global GTT */
#define PGETBL_SIZE_MASK 0x0000000e
#define PGETBL_SIZE_512KB (0 << 1)
#define PGETBL_SIZE_256KB (1 << 1)
#define PGETBL_SIZE_128KB (2 << 1)
#define PGETBL_SIZE_1MB (3 << 1)
#define PGETBL_SIZE_2MB (4 << 1)
#define PGETBL_SIZE_1_5MB (5 << 1)
#define G33_PGETBL_SIZE_MASK (3 << 8)
#define G33_PGETBL_SIZE_1M (1 << 8)
#define G33_PGETBL_SIZE_2M (2 << 8)
#define I830_PTE_BASE 0x10000
#define PTE_ADDRESS_MASK 0xfffff000
#define PTE_ADDRESS_MASK_HIGH 0x000000f0 /* i915+ */
#define PTE_MAPPING_TYPE_UNCACHED (0 << 1)
#define PTE_MAPPING_TYPE_DCACHE (1 << 1) /* i830 only */
#define PTE_MAPPING_TYPE_CACHED (3 << 1)
#define PTE_MAPPING_TYPE_MASK (3 << 1)
#define PTE_VALID (1 << 0)
/** @defgroup PGE_ERR
* @{
*/
/** Page table debug register for i845 */
#define PGE_ERR 0x2024
#define PGE_ERR_ADDR_MASK 0xFFFFF000
#define PGE_ERR_ID_MASK 0x00000038
#define PGE_ERR_CAPTURE 0x00000000
#define PGE_ERR_OVERLAY 0x00000008
#define PGE_ERR_DISPLAY 0x00000010
#define PGE_ERR_HOST 0x00000018
#define PGE_ERR_RENDER 0x00000020
#define PGE_ERR_BLITTER 0x00000028
#define PGE_ERR_MAPPING 0x00000030
#define PGE_ERR_CMD_PARSER 0x00000038
#define PGE_ERR_TYPE_MASK 0x00000007
#define PGE_ERR_INV_TABLE 0x00000000
#define PGE_ERR_INV_PTE 0x00000001
#define PGE_ERR_MIXED_TYPES 0x00000002
#define PGE_ERR_PAGE_MISS 0x00000003
#define PGE_ERR_ILLEGAL_TRX 0x00000004
#define PGE_ERR_LOCAL_MEM 0x00000005
#define PGE_ERR_TILED 0x00000006
/** @} */
/** @defgroup PGTBL_ER
* @{
*/
/** Page table debug register for i945 */
# define PGTBL_ER 0x2024
# define PGTBL_ERR_MT_TILING (1 << 27)
# define PGTBL_ERR_MT_GTT_PTE (1 << 26)
# define PGTBL_ERR_LC_TILING (1 << 25)
# define PGTBL_ERR_LC_GTT_PTE (1 << 24)
# define PGTBL_ERR_BIN_VERTEXDATA_GTT_PTE (1 << 23)
# define PGTBL_ERR_BIN_INSTRUCTION_GTT_PTE (1 << 22)
# define PGTBL_ERR_CS_VERTEXDATA_GTT_PTE (1 << 21)
# define PGTBL_ERR_CS_INSTRUCTION_GTT_PTE (1 << 20)
# define PGTBL_ERR_CS_GTT (1 << 19)
# define PGTBL_ERR_OVERLAY_TILING (1 << 18)
# define PGTBL_ERR_OVERLAY_GTT_PTE (1 << 16)
# define PGTBL_ERR_DISPC_TILING (1 << 14)
# define PGTBL_ERR_DISPC_GTT_PTE (1 << 12)
# define PGTBL_ERR_DISPB_TILING (1 << 10)
# define PGTBL_ERR_DISPB_GTT_PTE (1 << 8)
# define PGTBL_ERR_DISPA_TILING (1 << 6)
# define PGTBL_ERR_DISPA_GTT_PTE (1 << 4)
# define PGTBL_ERR_HOST_PTE_DATA (1 << 1)
# define PGTBL_ERR_HOST_GTT_PTE (1 << 0)
/** @} */
/* Ring buffer registers, p277, overview p19
*/
#define LP_RING 0x2030
#define HP_RING 0x2040
#define RING_TAIL 0x00
#define TAIL_ADDR 0x000FFFF8
#define I830_TAIL_MASK 0x001FFFF8
#define RING_HEAD 0x04
#define HEAD_WRAP_COUNT 0xFFE00000
#define HEAD_WRAP_ONE 0x00200000
#define HEAD_ADDR 0x001FFFFC
#define I830_HEAD_MASK 0x001FFFFC
#define RING_START 0x08
#define START_ADDR 0x03FFFFF8
#define I830_RING_START_MASK 0xFFFFF000
#define RING_LEN 0x0C
#define RING_NR_PAGES 0x001FF000
#define I830_RING_NR_PAGES 0x001FF000
#define RING_REPORT_MASK 0x00000006
#define RING_REPORT_64K 0x00000002
#define RING_REPORT_128K 0x00000004
#define RING_NO_REPORT 0x00000000
#define RING_VALID_MASK 0x00000001
#define RING_VALID 0x00000001
#define RING_INVALID 0x00000000
/* BitBlt Instructions
*
* There are many more masks & ranges yet to add.
*/
#define BR00_BITBLT_CLIENT 0x40000000
#define BR00_OP_COLOR_BLT 0x10000000
#define BR00_OP_SRC_COPY_BLT 0x10C00000
#define BR00_OP_FULL_BLT 0x11400000
#define BR00_OP_MONO_SRC_BLT 0x11800000
#define BR00_OP_MONO_SRC_COPY_BLT 0x11000000
#define BR00_OP_MONO_PAT_BLT 0x11C00000
#define BR00_OP_MONO_SRC_COPY_IMMEDIATE_BLT (0x61 << 22)
#define BR00_OP_TEXT_IMMEDIATE_BLT 0xc000000
#define BR00_TPCY_DISABLE 0x00000000
#define BR00_TPCY_ENABLE 0x00000010
#define BR00_TPCY_ROP 0x00000000
#define BR00_TPCY_NO_ROP 0x00000020
#define BR00_TPCY_EQ 0x00000000
#define BR00_TPCY_NOT_EQ 0x00000040
#define BR00_PAT_MSB_FIRST 0x00000000 /* ? */
#define BR00_PAT_VERT_ALIGN 0x000000e0
#define BR00_LENGTH 0x0000000F
#define BR09_DEST_ADDR 0x03FFFFFF
#define BR11_SOURCE_PITCH 0x00003FFF
#define BR12_SOURCE_ADDR 0x03FFFFFF
#define BR13_SOLID_PATTERN 0x80000000
#define BR13_RIGHT_TO_LEFT 0x40000000
#define BR13_LEFT_TO_RIGHT 0x00000000
#define BR13_MONO_TRANSPCY 0x20000000
#define BR13_MONO_PATN_TRANS 0x10000000
#define BR13_USE_DYN_DEPTH 0x04000000
#define BR13_DYN_8BPP 0x00000000
#define BR13_DYN_16BPP 0x01000000
#define BR13_DYN_24BPP 0x02000000
#define BR13_ROP_MASK 0x00FF0000
#define BR13_DEST_PITCH 0x0000FFFF
#define BR13_PITCH_SIGN_BIT 0x00008000
#define BR14_DEST_HEIGHT 0xFFFF0000
#define BR14_DEST_WIDTH 0x0000FFFF
#define BR15_PATTERN_ADDR 0x03FFFFFF
#define BR16_SOLID_PAT_COLOR 0x00FFFFFF
#define BR16_BACKGND_PAT_CLR 0x00FFFFFF
#define BR17_FGND_PAT_CLR 0x00FFFFFF
#define BR18_SRC_BGND_CLR 0x00FFFFFF
#define BR19_SRC_FGND_CLR 0x00FFFFFF
/* Instruction parser instructions
*/
#define INST_PARSER_CLIENT 0x00000000
#define INST_OP_FLUSH 0x02000000
#define INST_FLUSH_MAP_CACHE 0x00000001
#define GFX_OP_USER_INTERRUPT ((0<<29)|(2<<23))
/* Registers in the i810 host-pci bridge pci config space which affect
* the i810 graphics operations.
*/
#define SMRAM_MISCC 0x70
#define GMS 0x000000c0
#define GMS_DISABLE 0x00000000
#define GMS_ENABLE_BARE 0x00000040
#define GMS_ENABLE_512K 0x00000080
#define GMS_ENABLE_1M 0x000000c0
#define USMM 0x00000030
#define USMM_DISABLE 0x00000000
#define USMM_TSEG_ZERO 0x00000010
#define USMM_TSEG_512K 0x00000020