-
Notifications
You must be signed in to change notification settings - Fork 141
ARM: add support for Azure instances #2041
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
Merged
Merged
Conversation
This file contains 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
This is done in preparation for porting the Hyper-V drivers to ARM.
Some of the SCSI commands used by the storvsc driver (e.g. the command to read the device capacity) are only supported by direct access block devices, thus the driver should ignore other device types. This change removes a SCSI sense dump that is printed on the console when a SCSI error is detected while probing a "Virtual DVD-ROM" device in Azure instances (issue verified on Standard_B2pts_v2 ARM-based instances).
The GTDT (Generic Timer Description Table) is now used to retrieve the interrupt number for the ARM architected timer; the hard-coded GIC_TIMER_IRQ constant is only used as a fallback. This change fixes ARM timer operation on Azure ARM-based instances such as Standard_B2pts_v2 instances.
49e96a2
to
09dfd72
Compare
With this change, it is now possible to run Nanos on platforms (such as Azure ARM-based Standard_B2pts_v2 instances) where the range of memory addresses in the kernel ELF file (0x40400000 - 0x40600000) is not a valid physical memory range; in these cases, the kernel is loaded at physical addresses different from the ELF addresses. The offset between the kernel location in physical memory and the ELF addresses is stored in the `kernel_phys_offset` global variable. In addition, the address range for memory-mapped I/O is now dynamically detected when running on UEFI platforms, instead of being hard-coded to (0x00000000 - 0x40000000).
This change amends the pci_cfgread() and pci_cfgwrite() functions so that they don't do any MMIO access if the base address of the PCI configuration space has not been detected. This prevents access to invalid memory addresses in platforms (such as Azure ARM-based instances) where the ECAM base address is not exposed via the device tree or the MCFG ACPI table.
This allows the serial console to work on Azure ARM-based Standard_B2pts_v2 instances.
This enables the RTC functionality on platforms (such as Azure Standard_B2pts_v2 instances) that don't have a PL031 RTC (or where the PL031 peripheral is mapped at a different adddress than the address hardcoded in the kernel).
With this change, if no GEN_RDIST entry is present in the ACPI MADT, the vCPU-specific redistributor addresses are retrieved from the GEN_INT entries. This allows the GIC driver to work on platforms such as Azure ARM-based Standard_B2pts_v2 instances.
This change ports the Hyper-V drivers to the ARM architecture, which allows Nanos to run on Azure ARM-based instances; in addition, the SMBIOS entry point is passed from the UEFI bootloader to the kernel so that the cloud_init klib can detect (via DMI) whether the kernel is running on an Azure instance and finalize instance deployment according to Azure requirements.
09dfd72
to
9995aa3
Compare
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 change set adds support for running the kernel with different physical memory layouts, enhances run-time detection of peripheral resources, and ports the Hyper-V drivers to the ARM architecture. This allows Nanos to run on Azure ARM-based instances.