Closed
Conversation
added 5 commits
August 9, 2019 10:34
Avoid using GLOB for src/arch/arm/*/*.c so we can easily swap files in and out depending on the platform.
Move functionality that is common to gicv2 and gicv3 drivers from vgic.c to vgic.h so it can be used by the gicv3 driver.
- pull virq functionality that is not only relevant to the gicv2 into another header file, virq.h
set_active is completely unused
67e67af to
ce59382
Compare
This code is common between the gicv2 and giv3
vgic.c virtualises the gicv2
There are a few subtle differences in the gic distributor between gicv2 and v3. Refactor these into the gicv2 header to prepare for a gicv3 implementation.
Previously map_emulated_devices could only map a single 4k page. Now it will select the largest page size for the region and map multiple pages to cover it as required.
Allow faults to handle doublewords Change-Id: I990044bff6a7f05defb2adf86de7c239597d5fc7
Advance a read fault so the read data returns to the VM Change-Id: I11ec28160d382c96c423df83dfce5463850205bb
remove unneccessary indirection via vgic_priv_get_lr which made code difficult to read.
Party like it's not C99. Declaring variables before use can be useful but in this case the overuse makes the file much longer and harder to comprehend.
Remove virq_init, which is just used to zero a struct field by field. Allocate said struct with calloc so it is already zerod for simplicity.
- remove unneccessary asserts - replace assert(!"string") with ZF_LOGF
Instead of harding ARG0 as the location of the idx in the VGIC fault, use the correct libsel4 constant.
This commit adds support for emulating the gicv3. Work for this commit was pulled from prototype works by the following authors: Co-authored-by: Yanyan Shen <yanyan.shen@data61.csiro.au> Co-authored-by: Chris Guikema <chris.guikema@dornerworks.com>
ce59382 to
fcd70f6
Compare
This is the first platform to officially support the gicv3 in master.
fcd70f6 to
aed4301
Compare
pingerino
commented
Aug 13, 2019
|
|
||
| // this must be provided by files including this file, to select the appropriate | ||
| // gic dist per the hardware. | ||
| struct gic_dist_map; |
Contributor
Author
There was a problem hiding this comment.
this isn't required, delete
pingerino
commented
Aug 13, 2019
| * @TAG(DATA61_BSD) | ||
| */ | ||
| /* | ||
| * This component controls and maintains the GIC for the VM. |
Contributor
Author
There was a problem hiding this comment.
maybe this comment should be moved to vgic.h?
added 3 commits
August 14, 2019 16:02
Rather than have is_wfi, is_prefetch, add an enum type. This is simple and makes it easy to add new fault types.
Let's reduce the uninitialised variables.
- add some decoding of SMC instructions with output messages
- return the latest pcsi version from PSCI_VERSION
- tell the vm we don't need migration in PSCI_MIGRATE_INFO_TYPE
- ignore SIP service calls
- these are custom calls to the SoC and are currently unsupported
693e277 to
3d88add
Compare
Member
|
Closing this, as @kent-mcleod picked this up in #58 now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR preps the vgic code in libsel4arm-vmm for gicv3 support with minimal code duplication and introduces gicv3 emulation.
It also cleans up the code a lot, to make it easier to read and maintain and pulls in some fixes by
@chrisguikema from the dornerworks branches.