Page MenuHomeFreeBSD

Add GIC virtualization bits as a prerequisites for bhyvearm
Needs ReviewPublic

Authored by mihai on Aug 3 2017, 3:03 PM.

Details

Reviewers
andrew
Group Reviewers
ARM
Summary

Add GIC virtualization bits as a prerequisites for bhyvearm

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

sys/arm/arm/gic.c
682

This will be broken on arm64.

sys/arm/arm/gic_common.h
106

This should be #define<tab>GICD_...

sys/arm/arm/gic_fdt.c
217

In what case is di NULL?

sys/arm/arm/gic.c
682

Please provide some context. You are refering at the size of "result"?

sys/arm/arm/gic_fdt.c
217

In the early code development we had trouble with ivars (because of the parent-child relationship). And that was a check we did. We can remove it.

sys/arm/arm/gic.c
682

rman_get_virtual returns a virtual address. These are 64 bit on arm64, but unsigned int is only 32 bit, so the top 32 bits will be truncated.

sys/arm/arm/gic_fdt.c
217

Sorry. Talked with Alex Ivan and this is the reason why we got it out: the vgic doesn't have a device tree node and we couldn't make all the desired initializations and this is why 'di' gets NULL.

Can we keep it removed?

  • modified cast
  • fix tab/spaces
sys/arm/arm/gic.c
141–142

I don't think you need this entry. We should only ever see a maintenance interrupt on the root node, or a parent interrupt when the GIC is chained.

469–476

I don't think this is correct for non-root interrupt controllers.

1433–1434

This extra indentation was to indicate it was fields in the GICV2M_MSI_TYPER register.

sys/arm/arm/gic.c
141–142

So where to put this maintenance interrupt? On the vGIC?

469–476

Please propose an alternative. How you would see this?

sys/arm/arm/gic.c
141–142

You only need one entry here, it will then be either the maintenance interrupt, or the parent interrupt, or missing.

469–476

You'll need to extend the softc to add a flag to tell the difference, then set it in the fdt attachment before calling arm_gic_attach.

Alex Ivan update the diff using Andrew recommendations (parent or maintenance entry)

Any update on this?

Projects like bhyve-armv8 and bhyve-arm-virtio are approaching to the end and all these are prerequisites for them.