mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-22 07:51:16 +00:00
arch: Fix rust 1.48 clippy warnings
const should not be mutable types: https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
0dfffee6ba
commit
a406d90059
@ -43,7 +43,7 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
use vm_memory::{GuestAddress, GuestUsize};
|
use vm_memory::GuestAddress;
|
||||||
|
|
||||||
/// Below this address will reside the GIC, above this address will reside the MMIO devices.
|
/// Below this address will reside the GIC, above this address will reside the MMIO devices.
|
||||||
pub const MAPPED_IO_START: u64 = 0x0900_0000;
|
pub const MAPPED_IO_START: u64 = 0x0900_0000;
|
||||||
@ -61,7 +61,7 @@ pub const MEM_32BIT_DEVICES_SIZE: u64 = 0x3000_0000;
|
|||||||
|
|
||||||
/// PCI MMCONFIG space (start: after the device space at 1 GiB, length: 256MiB)
|
/// PCI MMCONFIG space (start: after the device space at 1 GiB, length: 256MiB)
|
||||||
pub const PCI_MMCONFIG_START: GuestAddress = GuestAddress(0x4000_0000);
|
pub const PCI_MMCONFIG_START: GuestAddress = GuestAddress(0x4000_0000);
|
||||||
pub const PCI_MMCONFIG_SIZE: GuestUsize = 256 << 20;
|
pub const PCI_MMCONFIG_SIZE: u64 = 256 << 20;
|
||||||
|
|
||||||
/// Start of RAM on 64 bit ARM.
|
/// Start of RAM on 64 bit ARM.
|
||||||
pub const RAM_64BIT_START: u64 = 0x8000_0000;
|
pub const RAM_64BIT_START: u64 = 0x8000_0000;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE-BSD-3-Clause file.
|
// found in the LICENSE-BSD-3-Clause file.
|
||||||
|
|
||||||
use vm_memory::{GuestAddress, GuestUsize};
|
use vm_memory::GuestAddress;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
@ -81,22 +81,22 @@ pub const HIGH_RAM_START: GuestAddress = GuestAddress(0x100000);
|
|||||||
|
|
||||||
// ** 32-bit reserved area (start: 3GiB, length: 1GiB) **
|
// ** 32-bit reserved area (start: 3GiB, length: 1GiB) **
|
||||||
pub const MEM_32BIT_RESERVED_START: GuestAddress = GuestAddress(0xc000_0000);
|
pub const MEM_32BIT_RESERVED_START: GuestAddress = GuestAddress(0xc000_0000);
|
||||||
pub const MEM_32BIT_RESERVED_SIZE: GuestUsize = 1024 << 20;
|
pub const MEM_32BIT_RESERVED_SIZE: u64 = 1024 << 20;
|
||||||
|
|
||||||
// == Fixed constants within the "32-bit reserved" range ==
|
// == Fixed constants within the "32-bit reserved" range ==
|
||||||
|
|
||||||
// Sub range: 32-bit PCI devices (start: 3GiB, length: 640Mib)
|
// Sub range: 32-bit PCI devices (start: 3GiB, length: 640Mib)
|
||||||
pub const MEM_32BIT_DEVICES_START: GuestAddress = MEM_32BIT_RESERVED_START;
|
pub const MEM_32BIT_DEVICES_START: GuestAddress = MEM_32BIT_RESERVED_START;
|
||||||
pub const MEM_32BIT_DEVICES_SIZE: GuestUsize = 640 << 20;
|
pub const MEM_32BIT_DEVICES_SIZE: u64 = 640 << 20;
|
||||||
|
|
||||||
// PCI MMCONFIG space (start: after the device space, length: 256MiB)
|
// PCI MMCONFIG space (start: after the device space, length: 256MiB)
|
||||||
pub const PCI_MMCONFIG_START: GuestAddress =
|
pub const PCI_MMCONFIG_START: GuestAddress =
|
||||||
GuestAddress(MEM_32BIT_DEVICES_START.0 + MEM_32BIT_DEVICES_SIZE);
|
GuestAddress(MEM_32BIT_DEVICES_START.0 + MEM_32BIT_DEVICES_SIZE);
|
||||||
pub const PCI_MMCONFIG_SIZE: GuestUsize = 256 << 20;
|
pub const PCI_MMCONFIG_SIZE: u64 = 256 << 20;
|
||||||
|
|
||||||
// IOAPIC
|
// IOAPIC
|
||||||
pub const IOAPIC_START: GuestAddress = GuestAddress(0xfec0_0000);
|
pub const IOAPIC_START: GuestAddress = GuestAddress(0xfec0_0000);
|
||||||
pub const IOAPIC_SIZE: GuestUsize = 0x20;
|
pub const IOAPIC_SIZE: u64 = 0x20;
|
||||||
|
|
||||||
// APIC
|
// APIC
|
||||||
pub const APIC_START: GuestAddress = GuestAddress(0xfee0_0000);
|
pub const APIC_START: GuestAddress = GuestAddress(0xfee0_0000);
|
||||||
|
Loading…
Reference in New Issue
Block a user