19#define BYTES_PER_PIXEL 4
39 MmioWrite32 (HDLCD_REG_FB_BASE, (UINT32)VramBaseAddress);
42 MmioWrite32 (HDLCD_REG_BUS_OPTIONS, (4 << 8) | HDLCD_BURST_8);
44 MmioWrite32 (HDLCD_REG_POLARITIES, HDLCD_DEFAULT_POLARITIES);
47 HDLCD_REG_PIXEL_FORMAT,
48 HDLCD_LITTLE_ENDIAN | HDLCD_4BYTES_PER_PIXEL
80 if (EFI_ERROR (Status)) {
85 ASSERT (Horizontal !=
NULL);
86 ASSERT (Vertical !=
NULL);
90 if (EFI_ERROR (Status)) {
106 MmioWrite32 (HDLCD_REG_BLUE_SELECT, (8 << 8) | 16);
110 MmioWrite32 (HDLCD_REG_GREEN_SELECT, (8 << 8) | 8);
117 HDLCD_REG_FB_LINE_LENGTH,
118 Horizontal->Resolution * BYTES_PER_PIXEL
122 HDLCD_REG_FB_LINE_PITCH,
123 Horizontal->Resolution * BYTES_PER_PIXEL
126 MmioWrite32 (HDLCD_REG_FB_LINE_COUNT, Vertical->Resolution - 1);
130 MmioWrite32 (HDLCD_REG_V_BACK_PORCH, Vertical->BackPorch);
131 MmioWrite32 (HDLCD_REG_V_DATA, Vertical->Resolution - 1);
132 MmioWrite32 (HDLCD_REG_V_FRONT_PORCH, Vertical->FrontPorch);
136 MmioWrite32 (HDLCD_REG_H_BACK_PORCH, Horizontal->BackPorch);
137 MmioWrite32 (HDLCD_REG_H_DATA, Horizontal->Resolution - 1);
138 MmioWrite32 (HDLCD_REG_H_FRONT_PORCH, Horizontal->FrontPorch);
169 if ((
MmioRead32 (HDLCD_REG_VERSION) >> 16) == HDLCD_PRODUCT_ID) {
173 return EFI_NOT_FOUND;
EFI_STATUS LcdSetMode(IN UINT32 ModeNumber)
EFI_STATUS LcdIdentify(VOID)
EFI_STATUS LcdInitialize(IN EFI_PHYSICAL_ADDRESS VramBaseAddress)
UINT32 EFIAPI MmioRead32(IN UINTN Address)
UINT32 EFIAPI MmioWrite32(IN UINTN Address, IN UINT32 Value)
#define ASSERT_EFI_ERROR(StatusParameter)
EFI_GRAPHICS_PIXEL_FORMAT
@ PixelRedGreenBlueReserved8BitPerColor
@ PixelBlueGreenRedReserved8BitPerColor
#define FixedPcdGetBool(TokenName)
UINT64 EFI_PHYSICAL_ADDRESS
EFI_GRAPHICS_PIXEL_FORMAT PixelFormat