Skip to content
This repository was archived by the owner on Oct 18, 2025. It is now read-only.

Fix the number of bits programmed for SPIs#68

Merged
qwandor merged 2 commits into
google:mainfrom
kuqin12:max_int
Jul 23, 2025
Merged

Fix the number of bits programmed for SPIs#68
qwandor merged 2 commits into
google:mainfrom
kuqin12:max_int

Conversation

@kuqin12

@kuqin12 kuqin12 commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

In the current initialization and interrupt enable routines, the code attempts to program all SPIs from 32 up to 1024 unconditionally.

However, since the upper 32 lines may not always be implemented, programming them can lead to unexpected behavior or trigger a SYN_SPI_BLOCK error if RAS is enabled.

This update refines the logic to first check the number of supported SPIs and only program up to the corresponding bit offsets.

The change has been tested on QEMU virtual platform and booted to UEFI shell environment.

Fixes #67.

@google-cla

google-cla Bot commented Jul 21, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@kuqin12 kuqin12 marked this pull request as ready for review July 21, 2025 17:53
@qwandor qwandor self-requested a review July 21, 2025 22:05
@qwandor qwandor merged commit 37ef5d0 into google:main Jul 23, 2025
5 checks passed
@kuqin12 kuqin12 deleted the max_int branch July 23, 2025 18:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Program up to max number of interrupts instead of 1024 lines

2 participants