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

(kernel-rolling) arch: Add LoongArch Old BPI (old-world firmware interface) support #179

Conversation

MingcongBai
Copy link
Contributor

@MingcongBai MingcongBai commented May 22, 2024

Picked and rebased from #130.

From original pull request:

This is a general PR, mainly adding compatibility support for ABI1.0 and ABI2.0, and some fixes. In addition, we also update deepin_loongarch_desktop_defconfig to boot Fedora.

Some links:
Fedora ISO: https://github.com/fedora-remix-loongarch/releases-info
Diff of ABI1.0 and ABI2.0: https://github.com/loongson/LoongArch-Documentation/pull/74
Firmware: https://github.com/loongson/Firmware/tree/main

    Rebase to the latest state of the branch compared to the previous pull request.

Yanteng Si (6):
LoongArch: add kernel setvirtmap for runtime
LoongArch: Old BPI compatibility
LoongArch: Fix virtual machine startup error
LoongArch: Fixed EIOINTC structure members
LoongArch: use arch specific phys_to_dma
LoongArch: Update deepin_loongarch_desktop_defconfig

Builds tested

  • amd64
  • arm64
  • loong64

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zccrs for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
Copy link

Hi @MingcongBai. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Yanteng Si added 6 commits May 29, 2024 08:36
Signed-off-by: liuyun <[email protected]>
Signed-off-by: Yanteng Si <[email protected]>
Signed-off-by: liuyun <[email protected]>
Signed-off-by: Yanteng Si <[email protected]>
Signed-off-by: liuyun <[email protected]>
Signed-off-by: maobibo <[email protected]>
Signed-off-by: Yanteng Si <[email protected]>
Resolve the problem that the multi-node cpus fail to boot.

Signed-off-by: yangqiming <[email protected]>
Signed-off-by: Yanteng Si <[email protected]>
To be compatible with OLD firmware which has no _DMA method,
we should use arch specific phys_to_dma.

Signed-off-by: Hongchen Zhang <[email protected]>
Signed-off-by: Yanteng Si <[email protected]>
The current config can't boot fedora, let's update it.

Signed-off-by: Yanteng Si <[email protected]>
@MingcongBai MingcongBai force-pushed the bai/kernel-rolling/loongarch-old-bpi branch from 670cb3e to 39b82fe Compare May 29, 2024 00:37
@deepin-ci-robot
Copy link

deepin pr auto review

loongarch: Fix interrupt routing on EIOCP

Prior to this commit, the interrupt routing on EIOCP was done
incorrectly. This patch fixes the issue by correctly parsing the
_CRS (Configuration Resources) table and setting up the interrupt
routing according to the ACPI specification.

loongarch: Fix interrupt routing on EIOCP

Prior to this commit, the interrupt routing on EIOCP was done
incorrectly. This patch fixes the issue by correctly parsing the
_CRS (Configuration Resources) table and setting up the interrupt
routing according to the ACPI specification.

@MingcongBai
Copy link
Contributor Author

Fails to build on loong64:

arch/loongarch/kernel/legacy_boot.c:94:6: error: no previous prototype for 'register_default_pic' [-Werror=missing-prototypes]
   94 | void register_default_pic(int id, u32 address, u32 irq_base)
      |      ^~~~~~~~~~~~~~~~~~~~
arch/loongarch/kernel/legacy_boot.c:259:13: error: no previous prototype for 'fw_init_cmdline' [-Werror=missing-prototypes]
  259 | __init void fw_init_cmdline(unsigned long argc, unsigned long cmdp)
      |             ^~~~~~~~~~~~~~~
arch/loongarch/kernel/legacy_boot.c:358:14: error: no previous prototype for 'bpi_init' [-Werror=missing-prototypes]
  358 | unsigned int bpi_init(void)
      |              ^~~~~~~~
cc1: all warnings being treated as errors

@Avenger-285714 @opsiff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants