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

Downstream: 2501: Merge some downstream changes into upstream #441

Merged
merged 21 commits into from
Jan 24, 2025

Conversation

qaz6750
Copy link
Member

@qaz6750 qaz6750 commented Jan 8, 2025

Explain

  • Merging some changes from downstream to upstream and proposing a Pr is to enable timely improvement in case of problems and avoid too many serious issues when merging to upstream.

Dependency Commit/PR

Change

SDM845

  • enchilada: Correcting DXE PE32 erroneous references

MSM8998

  • Add basic support for MSM8998 and OnePlus 5T.
    • Patching dumpling USBConfigdxe to use Windbg.
  • Add initial support for XiaoMi 6 (Sagit).
  • Add Windows support for SDM835 platform.

SM8150

  • Fix the incorrect use of ASN1X509Dxe.inf.

Common & Project

  • Correct the Codenames of msm8998.
  • Configure '-march' flags separately for each Silicon.
    • By making this change, each Silicon can be compiled using the corresponding '-march' flags.
  • CI: Enable build support for MSM8998 platform and devices.

Notice

  • The ACPI of both the dumpling and sagit devices will be updated after re-using the MTP-ACPI transplantation.
  • By making this change, each Silicon can be compiled using the corresponding '-march' flags.
    • The UEFI compiled with the "armv9-a+crypto+rcpc" parameter can be used on platforms that support armv9.

Problem

MSM8998

  • Currently, it is not possible to boot Windows using the ported UEFI. It will automatically restart after booting to bootmgfw (unknown reason), but Gurb2 starts well.
    • Already fixed
  • Memory allocation issue.
    • Already fixed
  • Windows fails to restart normally and should be investigated later.

Common

  • There are still some minor issues on certain platforms (which are not related to the actual UEFI usage). We hope to resolve them in the future so as to make the project more tidy and standard.

* PE32 should specify EFI format DXE instead of INF, fix them here.

Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
* The clockdxe in PatchedBinaries comes from Oneplus5T.
* For the convenience of debugging, temporarily disable
  AcpiPlatformUpdateLib.

Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
…actual conditions

Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
* At present, there is no way to load Windows, and we still need to
  investigate where the problem lies.

Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
@qaz6750
Copy link
Member Author

qaz6750 commented Jan 18, 2025

Process 1

  • We still need to investigate the bootmgfw loading issue and make improvements to some porting details.

Result 1

  • Already fixed

@qaz6750
Copy link
Member Author

qaz6750 commented Jan 18, 2025

Process 2

  • Loading bootmgfw and restarting is not a memory issue. On the contrary, by changing "- march", it can load.
  • Changing the parameter at -march to "armv8-a+crypto+rcpc" instead of "armv8.2-a+crypto+rcpc" can solve the problem, but the sdm835 platform is the only special case that requires this, and we have to consider the impact on other platformsChanging the parameter at -march to "armv8-a+crypto+rcpc" instead of "armv8.2-a+crypto+rcpc" can solve the problem, but the sdm835 platform is the only special case that requires this, and we have to consider the impact on other platforms.

Result 2

  • Optimized already.

@gus33000
Copy link
Collaborator

gus33000 commented Jan 18, 2025

MSM8998 and older are never ARMV8.1 or higher but simply ARMv8; such flags should be silicon dependent; and we shouldnt treat that as an exceptional/unique case either.

It should be defined on a per silicon basis. Another modern example are SW5100/SW5200 watch socs that are also ARMv8

but do not change it globally.

qaz6750 and others added 5 commits January 18, 2025 22:41
* By making this change, each Silicon can be compiled using the
  corresponding '-march' flags.

* Sm8475 and Sm8550 are both armv9.0, so we should also modify them to
  "armv9-a+crypto+rcpc", which will be changed after passing the
  subsequent tests.

Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
@qaz6750
Copy link
Member Author

qaz6750 commented Jan 19, 2025

Process 3

  • The testing device has 8g of memory, but after entering Windows, it can recognize a total of 8GB of memory, but only allocates (available) about 4-5g of memory. It is necessary to investigate why the memory has not been fully allocated.

  • 6G Memory:

    • RAM Entry 0 : Base 0x0000000040000000 Size 0x00000000C0000000
    • RAM Entry 1 : Base 0x0000000100000000 Size 0x00000000BD8C0000
  • 8G Memory:

    • RAM Entry 0 : Base 0x0000000080000000 Size 0x0000000100000000
    • RAM Entry 1 : Base 0x0000000180000000 Size 0x00000000FCCC0000
  • How to fully allocate memory is currently a challenge, as the MemoryBase is not the same.

Related Commit and PR

Result 3

  • For 6G memory devices, we need to test.
  • Already fixed.

@qaz6750 qaz6750 added the enhancement New feature or request label Jan 19, 2025
qaz6750 and others added 3 commits January 19, 2025 22:45
…tically allocated

* At present, it has passed the test on 8GB memory devices. Memory after
  0x180000000 will be automatically allocated as RAM by RamPartitionDxe,
  so we only need to add the memory that can be used as RAM before
  0x180000000.

Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
* DSDT.aml uses the publicly available DSDD_MTP.aml for basic testing
  before we have adapted the driver.

* Sagit is a representative that couldn't use the QCTREE driver in
  previous tests. So we add it now to test different circumstances (if
  possible).

Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
@qaz6750 qaz6750 marked this pull request as ready for review January 20, 2025 18:21
@qaz6750 qaz6750 marked this pull request as draft January 20, 2025 18:22
@qaz6750
Copy link
Member Author

qaz6750 commented Jan 21, 2025

Process 4

  • The UEFI port for the SDM835 platform has been basically completed, and efforts will be made to improve other aspects, but Windows Driver support and ACPI fixes will be carried out later(This is not part of the PR's plan).
  • At the same time, we must investigate the issue of Windows not being able to restart properly.

Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
* The ACPI of both the dumpling and sagit devices will be updated after
  re-using the MTP-ACPI transplantation.

Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
@qaz6750 qaz6750 marked this pull request as ready for review January 21, 2025 08:26
@qaz6750 qaz6750 requested a review from sunflower2333 January 21, 2025 08:36
Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
@qaz6750 qaz6750 requested a review from sunflower2333 January 22, 2025 15:34
@sunflower2333 sunflower2333 merged commit f857634 into Project-Aloha:main Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants