Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboard SBSA based ARM platform to MU #113

Merged
merged 131 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
a1146ff
initial upload
kuqin12 Oct 19, 2022
36134bc
update pointers
kuqin12 Oct 19, 2022
ef9a2ee
update pointers and add fdf.inc
kuqin12 Oct 19, 2022
ec56793
update
kuqin12 Oct 19, 2022
2958972
fix basecore pointer
TaylorBeebe Mar 24, 2022
813cd1a
updates to buildable package
TaylorBeebe Mar 29, 2022
01a5d3f
cortex pkg cleanup
TaylorBeebe Mar 31, 2022
88c1e91
fix stuart errors
TaylorBeebe Mar 31, 2022
38597b5
minimal changes to get booting
TaylorBeebe Aug 9, 2022
735fd18
building with clang35
TaylorBeebe Aug 9, 2022
a3c3ede
add platformbootmanagerlib cortex instance
TaylorBeebe Aug 10, 2022
3766fa7
graphics working, no input on shell
TaylorBeebe Aug 11, 2022
60ad9fb
remove debug print
TaylorBeebe Aug 11, 2022
f990820
enable use of virtio-gpu or ramfb
TaylorBeebe Aug 11, 2022
9f3e5e8
Changes to accomodate the latest submodule updates
kuqin12 Sep 27, 2022
a28da75
Revert some urls as they are no longer pointing to personal branch
kuqin12 Oct 19, 2022
0007624
Updated python script to compile with gcc properly
kuqin12 Sep 28, 2022
710f831
Use the toolchain from basecore
kuqin12 Sep 28, 2022
84bd5b9
Build but not release to anything...
kuqin12 Oct 3, 2022
97fc63d
First check in for the fdf and dsc changes
kuqin12 Oct 4, 2022
8617b09
Remove duplicate fdf inc
kuqin12 Oct 4, 2022
27de7e9
Back up
kuqin12 Oct 11, 2022
b4566ce
fdf and dsc changes
kuqin12 Oct 13, 2022
21cc474
Fixed the issue of reporting MM together with system memory
kuqin12 Oct 18, 2022
8432c44
Fixed the issue of reporting MM together with system memory
kuqin12 Oct 18, 2022
942d3dc
Start to pull in the nor flash driver
kuqin12 Oct 18, 2022
e7156d2
Start to pull in the nor flash driver
kuqin12 Oct 18, 2022
cf698be
Connect up with mm communicate drivers
kuqin12 Oct 18, 2022
364d3b7
Check in SbsaQemu from edk2 plat
kuqin12 Oct 18, 2022
dda2451
Merge the fdfs and added TFA as a submodule in the Common...
kuqin12 Oct 19, 2022
3036e61
Merge DSC
kuqin12 Oct 18, 2022
0da9d5a
Now that BL31 is streamlined into build process
kuqin12 Oct 18, 2022
ab1d177
Merged MM into stanadard UEFI, so that we build everything in one pass
kuqin12 Oct 18, 2022
ce890e9
Clean up some more duplicate pcds
kuqin12 Oct 18, 2022
d9ff486
Renamed dec file and added 2 new PCds
kuqin12 Oct 18, 2022
cbc224c
Now that variable storage works as expected
kuqin12 Oct 18, 2022
d4e4162
Removed extra file that is not needed
kuqin12 Oct 18, 2022
9cec368
TODO: This is still missing the different port change from dsc
kuqin12 Oct 18, 2022
1de7516
Updated basecore
kuqin12 Oct 19, 2022
fdacf28
Updated with latest ARM mu repo
kuqin12 Oct 19, 2022
98fd99e
Included FDT modules
kuqin12 Oct 19, 2022
b4f3896
Added include headers
kuqin12 Oct 19, 2022
913fc5b
Added ovmf librarues
kuqin12 Oct 19, 2022
e6d16d8
Added video support (somehow it is not lit up, could be QEMU issue)
kuqin12 Oct 19, 2022
f4158ed
Removed the unnecessary test driver
kuqin12 Oct 19, 2022
5fd8aba
Fix one build issue
kuqin12 Oct 19, 2022
2e1d6fa
Fixing the build issues, now that we can boot to Shell again
kuqin12 Oct 19, 2022
6302f4a
Fixing some warnings
kuqin12 Oct 24, 2022
3fb0643
Fixing theindexing error and removed gdb code
kuqin12 Oct 24, 2022
d502f1b
still booting to shell
kuqin12 Oct 24, 2022
409b3a3
Removed mu_tiano_arm
kuqin12 Oct 24, 2022
bc214c0
Remove TFA
kuqin12 Oct 24, 2022
218f3de
Readded mu-tiano-arm to silicon folder
kuqin12 Oct 24, 2022
c37c078
Readded TFA to silicon folder
kuqin12 Oct 24, 2022
b5d67d2
sort out the odd qemu runner serial issue
kuqin12 Oct 24, 2022
9b49666
Added change for qemu platform build
kuqin12 Oct 24, 2022
4835236
Removing the todo
kuqin12 Oct 24, 2022
e5034ec
Updated link
kuqin12 Oct 24, 2022
30857d0
Added Pci host bridge library for qemu sbsa
kuqin12 Oct 26, 2022
911999b
Added non discoverable AHI device
kuqin12 Oct 26, 2022
6be29e5
Added drivers to enumerate PCI devices
kuqin12 Oct 26, 2022
3997e24
Fixing the pcd build conflict
kuqin12 Oct 26, 2022
ab80fe2
Fixed BDS to use mu flavor
kuqin12 Oct 26, 2022
624fc2c
Committing acpi tables
kuqin12 Oct 27, 2022
c7cbf64
Added fdt helper lib
kuqin12 Oct 27, 2022
ebfc4b2
Removed the unused FDT modules
kuqin12 Oct 27, 2022
aaa127b
Updated MU_TIANO arm to top of release 202208
kuqin12 Oct 27, 2022
2563db1
Removed useless header file
kuqin12 Oct 27, 2022
f36d221
Updated qemu runner script to use max CPU
kuqin12 Oct 28, 2022
fd23741
Removed unused drivers from ovmg
kuqin12 Oct 28, 2022
106caef
Removed unused libiraries
kuqin12 Oct 28, 2022
67d33b4
Removed more unused libiraries
kuqin12 Oct 28, 2022
bf72dd6
Installed more sbsa acpi tables
kuqin12 Oct 28, 2022
851c6f7
Added ported PCDs and removed unused header files
kuqin12 Oct 28, 2022
f81155e
Added modified version of OEM Misc lib
kuqin12 Oct 28, 2022
7cfc105
Added SMBIOS driver
kuqin12 Oct 28, 2022
7d52350
Updated platform dsc and fdf files so that it can boot :)
kuqin12 Oct 28, 2022
58a1a4b
Renamed all cortex related stuff to be sbsa, since this is no longer …
kuqin12 Oct 28, 2022
fe424fd
Merge remote-tracking branch 'github/main' into personal/kuqin/test_bl31
kuqin12 Oct 28, 2022
ecb88a7
Add the kb and remove the extra VGA
kuqin12 Oct 28, 2022
2599e1c
Removed extra console entry
kuqin12 Oct 28, 2022
45c1d9c
Fixed the video, but the video driver has to be the ovmf as is
kuqin12 Oct 28, 2022
bf31253
Removed PlatformDxe driver
kuqin12 Oct 28, 2022
d4839b3
Further clean up?
kuqin12 Oct 28, 2022
b1b26e1
Updated qemu to be v7 be default
kuqin12 Oct 28, 2022
74fde4c
Port over the error handling
kuqin12 Oct 28, 2022
c4d25eb
Added multi core launching command
kuqin12 Oct 28, 2022
7ecd9b2
Updated the device path, so that we can connect as preferred video
kuqin12 Oct 28, 2022
43cd144
Added more MU modules, variable PEI does not work...
kuqin12 Oct 28, 2022
8907fbd
More fine tuning
kuqin12 Oct 28, 2022
0cff7c1
Updated build scripts
kuqin12 Oct 28, 2022
7d5d4dd
Revert checked in video driver
kuqin12 Oct 28, 2022
cff43fb
Removed requirement for var ppi, since it is not there
kuqin12 Oct 28, 2022
a33bbcb
Changes needed to make sbsa VGA render
kuqin12 Oct 28, 2022
5bc6340
Incorporated unit test
kuqin12 Oct 28, 2022
6bc8bdd
Pick up the latest MU_BASECORE
kuqin12 Oct 28, 2022
50afcfb
Temporarily remove some exception handling features
kuqin12 Oct 28, 2022
25469c3
Revert unused cahnges
kuqin12 Oct 28, 2022
3a676b2
Relocate the PCD...
kuqin12 Oct 28, 2022
f94812d
Clean the device lib
kuqin12 Oct 28, 2022
e6b6b55
Updated yaml files
kuqin12 Oct 28, 2022
0715cc5
Added yaml files
kuqin12 Oct 28, 2022
22c3bf9
Added accompanying changes
kuqin12 Oct 28, 2022
1352eca
Added a cap function
kuqin12 Oct 28, 2022
06b441e
Make the same change for Q35 as well
kuqin12 Oct 28, 2022
b5edc13
Added fdf change to properly populate profiles
kuqin12 Oct 31, 2022
f6096a9
Trying to fix the GOP issue, need a fix from MU_PLUS to accompany the…
kuqin12 Nov 1, 2022
99c16b9
Revert original change
kuqin12 Nov 1, 2022
19859c6
Fixed GOP to only attempt to show the closest display
kuqin12 Nov 1, 2022
0983e86
Picked up top of config repo
kuqin12 Nov 1, 2022
4fc618c
Updated md files to match what we are doing
kuqin12 Nov 1, 2022
402f5f0
Updated copyrights
kuqin12 Nov 2, 2022
5fad8da
Picking up v2.7 release tag
kuqin12 Nov 6, 2022
c6fc0f2
Added MM communicate to the reported memory, but how did it regress?
kuqin12 Nov 6, 2022
8150a50
Updated TFA command to speed up the building time
kuqin12 Nov 6, 2022
7bbde97
Updated to top of MU_TIANO_ARM to support variable and mm comm in PEI
kuqin12 Nov 6, 2022
03ef5e3
Now that we can revert this change
kuqin12 Nov 6, 2022
beb8265
Merge remote-tracking branch 'github/main' into personal/kuqin/test_bl31
kuqin12 Nov 17, 2022
76d99d7
Fixing debug macro catch
kuqin12 Nov 17, 2022
8bd9fa0
Update the GUID that clashes with the existing lib, and trying to sta…
kuqin12 Nov 17, 2022
61640c0
Revert the vbe shim addition, which was not needed for us
kuqin12 Nov 17, 2022
13d00a5
Iron out some pipeline issues
kuqin12 Nov 17, 2022
b0ad6c9
Updated the note since it is not intended to be a server centric plat…
kuqin12 Nov 17, 2022
1fb53d8
Uncrustify update
kuqin12 Nov 17, 2022
f62edbc
Uncrustify update v
kuqin12 Nov 17, 2022
ac34884
Added support for ci build for sbsa package
kuqin12 Nov 17, 2022
2bddbd2
Making it pass CI?
kuqin12 Nov 17, 2022
b7aacde
Onborad sbsa ci build
kuqin12 Nov 17, 2022
ab8a8a5
trying to fix pipeline?
kuqin12 Nov 17, 2022
072fec3
Merge remote-tracking branch 'github/main' into personal/kuqin/test_bl31
kuqin12 Nov 18, 2022
f77f785
Fixed spell checks
kuqin12 Nov 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .azurepipelines/Ubuntu-GCC5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resources:
ref: main

variables:
- group: architectures-x86-64
- group: architectures-arm64-x86-64
- group: tool-chain-ubuntu-gcc

jobs:
Expand All @@ -27,7 +27,7 @@ jobs:
do_non_ci_build: false
do_non_ci_setup: true
do_pr_eval: true
packages: QemuQ35Pkg
packages: QemuQ35Pkg,QemuSbsaPkg
target_list: NO-TARGET
tool_chain_tag: $(tool_chain_tag)
vm_image: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@
path = Common/MU_OEM_SAMPLE
url = https://github.com/microsoft/mu_oem_sample.git
branch = release/202208
[submodule "Silicon/Arm/MU_TIANO"]
path = Silicon/Arm/MU_TIANO
url = https://github.com/microsoft/mu_silicon_arm_tiano.git
branch = release/202208
[submodule "Silicon/Arm/TFA"]
path = Silicon/Arm/TFA
url = https://github.com/ARM-software/arm-trusted-firmware.git
branch = v2.7
5 changes: 3 additions & 2 deletions .pytool/CISettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ def GetPackagesSupported(self):
''' return iterable of edk2 packages supported by this build.
These should be edk2 workspace relative paths '''

return ("QemuQ35Pkg",)
return ("QemuQ35Pkg","QemuSbsaPkg")

def GetArchitecturesSupported(self):
''' return iterable of edk2 architectures supported by this build '''
return ("IA32",
"X64")
"X64",
"AARCH64")

def GetTargetsSupported(self):
''' return iterable of edk2 target tags supported by this build '''
Expand Down
2 changes: 1 addition & 1 deletion Features/mu_config_ext_dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"name": "FEATURE_CONFIG",
"var_name": "FEATURE_CONFIG_PATH",
"source": "https://github.com/microsoft/mu_feature_config.git",
"version": "a94415b80bbd559de4678ecf012b75163ebd5275",
"version": "aedb83bef7882353b3ee36958f23df65468db3eb",
"flags": ["set_build_var"]
}
7 changes: 7 additions & 0 deletions Platforms/QemuQ35Pkg/QemuQ35Pkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,13 @@
# instance in PiSmmCpuDxeSmm, and CpuHotplugSmm.
gUefiQemuQ35PkgTokenSpaceGuid.PcdCpuHotEjectDataAddress|0|UINT64|0x46

## This PCD tracks where PcdVideo{Horizontal,Vertical}Resolution
# values are coming from.
# 0 - unset (defaults from platform dsc)
# 1 - set from PlatformConfig
# 2 - set by GOP Driver.
gUefiQemuQ35PkgTokenSpaceGuid.PcdVideoResolutionSource|0|UINT8|0x64

[PcdsFeatureFlag]
gUefiQemuQ35PkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE|BOOLEAN|0x1c
gUefiQemuQ35PkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|FALSE|BOOLEAN|0x1d
Expand Down
2 changes: 2 additions & 0 deletions Platforms/QemuQ35Pkg/QemuQ35Pkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,8 @@ PlatformSmmProtectionsTestLib|UefiTestingPkg/Library/PlatformSmmProtectionsTestL
# Set video resolution for text setup.
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|1024
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|768
# Set video resolution source to be controlled by video driver
gUefiQemuQ35PkgTokenSpaceGuid.PcdVideoResolutionSource|2

gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0208
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
Expand Down
200 changes: 199 additions & 1 deletion Platforms/QemuQ35Pkg/QemuVideoDxe/Driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,36 @@ QEMU_VIDEO_CARD gQemuVideoCardList[] = {
CIRRUS_LOGIC_5446_DEVICE_ID,
QEMU_VIDEO_CIRRUS_5446,
L"Cirrus 5446"
},{
PCI_CLASS_DISPLAY_VGA,
0x1234,
0x1111,
QEMU_VIDEO_BOCHS_MMIO,
L"QEMU Standard VGA"
},{
PCI_CLASS_DISPLAY_OTHER,
0x1234,
0x1111,
QEMU_VIDEO_BOCHS_MMIO,
L"QEMU Standard VGA (secondary)"
},{
PCI_CLASS_DISPLAY_VGA,
0x1b36,
0x0100,
QEMU_VIDEO_BOCHS,
L"QEMU QXL VGA"
},{
PCI_CLASS_DISPLAY_VGA,
0x1af4,
0x1050,
QEMU_VIDEO_BOCHS_MMIO,
L"QEMU VirtIO VGA"
},{
PCI_CLASS_DISPLAY_VGA,
0x15ad,
0x0405,
QEMU_VIDEO_VMWARE_SVGA,
L"QEMU VMWare SVGA"
},{
0 /* end of list */
}
Expand Down Expand Up @@ -175,6 +205,7 @@ QemuVideoControllerDriverStart (
EFI_TPL OldTpl;
EFI_STATUS Status;
QEMU_VIDEO_PRIVATE_DATA *Private;
BOOLEAN IsQxl;
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
ACPI_ADR_DEVICE_PATH AcpiDeviceNode;
PCI_TYPE00 Pci;
Expand Down Expand Up @@ -238,6 +269,12 @@ QemuVideoControllerDriverStart (

Private->Variant = Card->Variant;

//
// IsQxl is based on the detected Card->Variant, which at a later point might
// not match Private->Variant.
//
IsQxl = (BOOLEAN)(Card->Variant == QEMU_VIDEO_BOCHS);

//
// Save original PCI attributes
//
Expand Down Expand Up @@ -300,6 +337,59 @@ QemuVideoControllerDriverStart (
goto ClosePciIo;
}

//
// Check whenever the qemu stdvga mmio bar is present (qemu 1.3+).
//
if (Private->Variant == QEMU_VIDEO_BOCHS_MMIO) {
EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *MmioDesc;

Status = Private->PciIo->GetBarAttributes (
Private->PciIo,
PCI_BAR_IDX2,
NULL,
(VOID **)&MmioDesc
);
if (EFI_ERROR (Status) ||
(MmioDesc->ResType != ACPI_ADDRESS_SPACE_TYPE_MEM))
{
DEBUG ((DEBUG_INFO, "QemuVideo: No mmio bar, fallback to port io\n"));
Private->Variant = QEMU_VIDEO_BOCHS;
} else {
DEBUG ((
DEBUG_INFO,
"QemuVideo: Using mmio bar @ 0x%lx\n",
MmioDesc->AddrRangeMin
));
}

if (!EFI_ERROR (Status)) {
FreePool (MmioDesc);
}
}

//
// VMWare SVGA is handled like Bochs (with port IO only).
//
if (Private->Variant == QEMU_VIDEO_VMWARE_SVGA) {
Private->Variant = QEMU_VIDEO_BOCHS;
Private->FrameBufferVramBarIndex = PCI_BAR_IDX1;
}

//
// Check if accessing the bochs interface works.
//
if ((Private->Variant == QEMU_VIDEO_BOCHS_MMIO) ||
(Private->Variant == QEMU_VIDEO_BOCHS))
{
UINT16 BochsId;
BochsId = BochsRead (Private, VBE_DISPI_INDEX_ID);
if ((BochsId & 0xFFF0) != VBE_DISPI_ID0) {
DEBUG ((DEBUG_INFO, "QemuVideo: BochsID mismatch (got 0x%x)\n", BochsId));
Status = EFI_DEVICE_ERROR;
goto RestoreAttributes;
}
}

//
// Get ParentDevicePath
//
Expand Down Expand Up @@ -351,6 +441,10 @@ QemuVideoControllerDriverStart (
case QEMU_VIDEO_CIRRUS_5446:
Status = QemuVideoCirrusModeSetup (Private);
break;
case QEMU_VIDEO_BOCHS_MMIO:
case QEMU_VIDEO_BOCHS:
Status = QemuVideoBochsModeSetup (Private, IsQxl);
break;
default:
ASSERT (FALSE);
Status = EFI_DEVICE_ERROR;
Expand Down Expand Up @@ -827,14 +921,118 @@ InitializeCirrusGraphicsMode (
ClearScreen (Private);
}

VOID
BochsWrite (
QEMU_VIDEO_PRIVATE_DATA *Private,
UINT16 Reg,
UINT16 Data
)
{
EFI_STATUS Status;

if (Private->Variant == QEMU_VIDEO_BOCHS_MMIO) {
Status = Private->PciIo->Mem.Write (
Private->PciIo,
EfiPciIoWidthUint16,
PCI_BAR_IDX2,
0x500 + (Reg << 1),
1,
&Data
);
ASSERT_EFI_ERROR (Status);
} else {
outw (Private, VBE_DISPI_IOPORT_INDEX, Reg);
outw (Private, VBE_DISPI_IOPORT_DATA, Data);
}
}

UINT16
BochsRead (
QEMU_VIDEO_PRIVATE_DATA *Private,
UINT16 Reg
)
{
EFI_STATUS Status;
UINT16 Data;

if (Private->Variant == QEMU_VIDEO_BOCHS_MMIO) {
Status = Private->PciIo->Mem.Read (
Private->PciIo,
EfiPciIoWidthUint16,
PCI_BAR_IDX2,
0x500 + (Reg << 1),
1,
&Data
);
ASSERT_EFI_ERROR (Status);
} else {
outw (Private, VBE_DISPI_IOPORT_INDEX, Reg);
Data = inw (Private, VBE_DISPI_IOPORT_DATA);
}

return Data;
}

VOID
VgaOutb (
QEMU_VIDEO_PRIVATE_DATA *Private,
UINTN Reg,
UINT8 Data
)
{
outb (Private, Reg, Data);
EFI_STATUS Status;

if (Private->Variant == QEMU_VIDEO_BOCHS_MMIO) {
Status = Private->PciIo->Mem.Write (
Private->PciIo,
EfiPciIoWidthUint8,
PCI_BAR_IDX2,
0x400 - 0x3c0 + Reg,
1,
&Data
);
ASSERT_EFI_ERROR (Status);
} else {
outb (Private, Reg, Data);
}
}

VOID
InitializeBochsGraphicsMode (
QEMU_VIDEO_PRIVATE_DATA *Private,
QEMU_VIDEO_MODE_DATA *ModeData
)
{
DEBUG ((
DEBUG_INFO,
"InitializeBochsGraphicsMode: %dx%d @ %d\n",
ModeData->HorizontalResolution,
ModeData->VerticalResolution,
ModeData->ColorDepth
));

/* unblank */
VgaOutb (Private, ATT_ADDRESS_REGISTER, 0x20);

BochsWrite (Private, VBE_DISPI_INDEX_ENABLE, 0);
BochsWrite (Private, VBE_DISPI_INDEX_BANK, 0);
BochsWrite (Private, VBE_DISPI_INDEX_X_OFFSET, 0);
BochsWrite (Private, VBE_DISPI_INDEX_Y_OFFSET, 0);

BochsWrite (Private, VBE_DISPI_INDEX_BPP, (UINT16)ModeData->ColorDepth);
BochsWrite (Private, VBE_DISPI_INDEX_XRES, (UINT16)ModeData->HorizontalResolution);
BochsWrite (Private, VBE_DISPI_INDEX_VIRT_WIDTH, (UINT16)ModeData->HorizontalResolution);
BochsWrite (Private, VBE_DISPI_INDEX_YRES, (UINT16)ModeData->VerticalResolution);
BochsWrite (Private, VBE_DISPI_INDEX_VIRT_HEIGHT, (UINT16)ModeData->VerticalResolution);

BochsWrite (
Private,
VBE_DISPI_INDEX_ENABLE,
VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED
);

SetDefaultPalette (Private);
ClearScreen (Private);
}

EFI_STATUS
Expand Down
41 changes: 29 additions & 12 deletions Platforms/QemuQ35Pkg/QemuVideoDxe/Gop.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ QemuVideoCompleteModeInfo (
Info->PixelInformation.BlueMask = PIXEL24_BLUE_MASK;
Info->PixelInformation.ReservedMask = 0;
} else if (ModeData->ColorDepth == 32) {
DEBUG ((DEBUG_INFO, "PixelBlueGreenRedReserved8BitPerColor\n"));
Info->PixelFormat = PixelBlueGreenRedReserved8BitPerColor;
DEBUG ((DEBUG_VERBOSE, "PixelBlueGreenRedReserved8BitPerColor\n"));
Info->PixelFormat = PixelBlueGreenRedReserved8BitPerColor;
Info->PixelInformation.RedMask = 0;
Info->PixelInformation.GreenMask = 0;
Info->PixelInformation.BlueMask = 0;
Info->PixelInformation.ReservedMask = 0;
} else {
DEBUG ((DEBUG_ERROR, "%a: Invalid ColorDepth %u", __FUNCTION__, ModeData->ColorDepth));
ASSERT (FALSE);
}

Info->PixelsPerScanLine = Info->HorizontalResolution;
Expand Down Expand Up @@ -175,6 +182,10 @@ Routine Description:
case QEMU_VIDEO_CIRRUS_5446:
InitializeCirrusGraphicsMode (Private, &QemuVideoCirrusModes[ModeData->InternalModeIndex]);
break;
case QEMU_VIDEO_BOCHS_MMIO:
case QEMU_VIDEO_BOCHS:
InitializeBochsGraphicsMode (Private, ModeData);
break;
default:
ASSERT (FALSE);
return EFI_DEVICE_ERROR;
Expand Down Expand Up @@ -245,16 +256,16 @@ Routine Description:
EFI_STATUS
EFIAPI
QemuVideoGraphicsOutputBlt (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
IN UINTN SourceX,
IN UINTN SourceY,
IN UINTN DestinationX,
IN UINTN DestinationY,
IN UINTN Width,
IN UINTN Height,
IN UINTN Delta
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL,
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
IN UINTN SourceX,
IN UINTN SourceY,
IN UINTN DestinationX,
IN UINTN DestinationY,
IN UINTN Width,
IN UINTN Height,
IN UINTN Delta
)

/*++
Expand Down Expand Up @@ -435,6 +446,12 @@ QemuVideoGraphicsOutputConstructor (
goto FreeInfo;
}

DrawLogo (
Private,
Private->ModeData[Private->GraphicsOutput.Mode->Mode].HorizontalResolution,
Private->ModeData[Private->GraphicsOutput.Mode->Mode].VerticalResolution
);

return EFI_SUCCESS;

FreeInfo:
Expand Down
Loading