8#ifndef LCD_PLATFORM_LIB_H_
9#define LCD_PLATFORM_LIB_H_
13#define LCD_VRAM_SIZE SIZE_8MB
30#define VGA_H_RES_PIXELS 640
31#define VGA_V_RES_PIXELS 480
32#define VGA_OSC_FREQUENCY 23750000
34#define VGA_H_SYNC ( 80 - 1)
35#define VGA_H_FRONT_PORCH ( 16 - 1)
36#define VGA_H_BACK_PORCH ( 64 - 1)
38#define VGA_V_SYNC ( 4 - 1)
39#define VGA_V_FRONT_PORCH ( 3 - 1)
40#define VGA_V_BACK_PORCH ( 13 - 1)
43#define SVGA_H_RES_PIXELS 800
44#define SVGA_V_RES_PIXELS 600
45#define SVGA_OSC_FREQUENCY 38250000
47#define SVGA_H_SYNC ( 80 - 1)
48#define SVGA_H_FRONT_PORCH ( 32 - 1)
49#define SVGA_H_BACK_PORCH (112 - 1)
51#define SVGA_V_SYNC ( 4 - 1)
52#define SVGA_V_FRONT_PORCH ( 3 - 1)
53#define SVGA_V_BACK_PORCH ( 17 - 1)
56#define XGA_H_RES_PIXELS 1024
57#define XGA_V_RES_PIXELS 768
58#define XGA_OSC_FREQUENCY 63500000
60#define XGA_H_SYNC (104 - 1)
61#define XGA_H_FRONT_PORCH ( 48 - 1)
62#define XGA_H_BACK_PORCH (152 - 1)
64#define XGA_V_SYNC ( 4 - 1)
65#define XGA_V_FRONT_PORCH ( 3 - 1)
66#define XGA_V_BACK_PORCH ( 23 - 1)
69#define SXGA_H_RES_PIXELS 1280
70#define SXGA_V_RES_PIXELS 1024
71#define SXGA_OSC_FREQUENCY 109000000
73#define SXGA_H_SYNC (136 - 1)
74#define SXGA_H_FRONT_PORCH ( 80 - 1)
75#define SXGA_H_BACK_PORCH (216 - 1)
77#define SXGA_V_SYNC ( 7 - 1)
78#define SXGA_V_FRONT_PORCH ( 3 - 1)
79#define SXGA_V_BACK_PORCH ( 29 - 1)
82#define WSXGA_H_RES_PIXELS 1680
83#define WSXGA_V_RES_PIXELS 1050
84#define WSXGA_OSC_FREQUENCY 147000000
86#define WSXGA_H_SYNC (170 - 1)
87#define WSXGA_H_FRONT_PORCH (104 - 1)
88#define WSXGA_H_BACK_PORCH (274 - 1)
90#define WSXGA_V_SYNC ( 5 - 1)
91#define WSXGA_V_FRONT_PORCH ( 4 - 1)
92#define WSXGA_V_BACK_PORCH ( 41 - 1)
95#define UXGA_H_RES_PIXELS 1600
96#define UXGA_V_RES_PIXELS 1200
97#define UXGA_OSC_FREQUENCY 161000000
99#define UXGA_H_SYNC (168 - 1)
100#define UXGA_H_FRONT_PORCH (112 - 1)
101#define UXGA_H_BACK_PORCH (280 - 1)
103#define UXGA_V_SYNC ( 4 - 1)
104#define UXGA_V_FRONT_PORCH ( 3 - 1)
105#define UXGA_V_BACK_PORCH ( 38 - 1)
108#define HD_H_RES_PIXELS 1920
109#define HD_V_RES_PIXELS 1080
110#define HD_OSC_FREQUENCY 165000000
112#define HD_H_SYNC ( 79 - 1)
113#define HD_H_FRONT_PORCH (128 - 1)
114#define HD_H_BACK_PORCH (328 - 1)
116#define HD_V_SYNC ( 5 - 1)
117#define HD_V_FRONT_PORCH ( 3 - 1)
118#define HD_V_BACK_PORCH ( 32 - 1)
121#define WVGA_H_RES_PIXELS 800
122#define WVGA_V_RES_PIXELS 480
123#define WVGA_OSC_FREQUENCY 29500000
124#define WVGA_H_SYNC ( 72 - 1)
125#define WVGA_H_FRONT_PORCH ( 24 - 1)
126#define WVGA_H_BACK_PORCH ( 96 - 1)
127#define WVGA_V_SYNC ( 7 - 1)
128#define WVGA_V_FRONT_PORCH ( 3 - 1)
129#define WVGA_V_BACK_PORCH ( 10 - 1)
132#define QHD_H_RES_PIXELS 960
133#define QHD_V_RES_PIXELS 540
134#define QHD_OSC_FREQUENCY 40750000
135#define QHD_H_SYNC ( 96 - 1)
136#define QHD_H_FRONT_PORCH ( 32 - 1)
137#define QHD_H_BACK_PORCH (128 - 1)
138#define QHD_V_SYNC ( 5 - 1)
139#define QHD_V_FRONT_PORCH ( 3 - 1)
140#define QHD_V_BACK_PORCH ( 14 - 1)
143#define WSVGA_H_RES_PIXELS 1024
144#define WSVGA_V_RES_PIXELS 600
145#define WSVGA_OSC_FREQUENCY 49000000
146#define WSVGA_H_SYNC (104 - 1)
147#define WSVGA_H_FRONT_PORCH ( 40 - 1)
148#define WSVGA_H_BACK_PORCH (144 - 1)
149#define WSVGA_V_SYNC ( 10 - 1)
150#define WSVGA_V_FRONT_PORCH ( 3 - 1)
151#define WSVGA_V_BACK_PORCH ( 11 - 1)
154#define HD720_H_RES_PIXELS 1280
155#define HD720_V_RES_PIXELS 720
156#define HD720_OSC_FREQUENCY 74500000
157#define HD720_H_SYNC (128 - 1)
158#define HD720_H_FRONT_PORCH ( 64 - 1)
159#define HD720_H_BACK_PORCH (192 - 1)
160#define HD720_V_SYNC ( 5 - 1)
161#define HD720_V_FRONT_PORCH ( 3 - 1)
162#define HD720_V_BACK_PORCH ( 20 - 1)
165#define WXGA_H_RES_PIXELS 1280
166#define WXGA_V_RES_PIXELS 800
167#define WXGA_OSC_FREQUENCY 83500000
168#define WXGA_H_SYNC (128 - 1)
169#define WXGA_H_FRONT_PORCH ( 72 - 1)
170#define WXGA_H_BACK_PORCH (200 - 1)
171#define WXGA_V_SYNC ( 6 - 1)
172#define WXGA_V_FRONT_PORCH ( 3 - 1)
173#define WXGA_V_BACK_PORCH ( 22 - 1)
176#define LCD_24BPP_RED_MASK 0x00FF0000
177#define LCD_24BPP_GREEN_MASK 0x0000FF00
178#define LCD_24BPP_BLUE_MASK 0x000000FF
179#define LCD_24BPP_RESERVED_MASK 0xFF000000
181#define LCD_16BPP_555_RED_MASK 0x00007C00
182#define LCD_16BPP_555_GREEN_MASK 0x000003E0
183#define LCD_16BPP_555_BLUE_MASK 0x0000001F
184#define LCD_16BPP_555_RESERVED_MASK 0x00000000
186#define LCD_16BPP_565_RED_MASK 0x0000F800
187#define LCD_16BPP_565_GREEN_MASK 0x000007E0
188#define LCD_16BPP_565_BLUE_MASK 0x0000001F
189#define LCD_16BPP_565_RESERVED_MASK 0x00008000
191#define LCD_12BPP_444_RED_MASK 0x00000F00
192#define LCD_12BPP_444_GREEN_MASK 0x000000F0
193#define LCD_12BPP_444_BLUE_MASK 0x0000000F
194#define LCD_12BPP_444_RESERVED_MASK 0x0000F000
200 LcdBitsPerPixel_1 = 0,
204 LcdBitsPerPixel_16_555,
206 LcdBitsPerPixel_16_565,
207 LcdBitsPerPixel_12_444,
286 IN UINT32 ModeNumber,
306 IN UINT32 ModeNumber,
323 IN UINT32 ModeNumber,
UINT64 EFI_PHYSICAL_ADDRESS