1 /* 2 * PPC64 architecture-specific definitions 3 * 4 * Copyright 2011 Matt Evans <matt@ozlabs.org>, IBM Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 as published 8 * by the Free Software Foundation. 9 */ 10 11 #ifndef KVM__KVM_ARCH_H 12 #define KVM__KVM_ARCH_H 13 14 #include <stdbool.h> 15 #include <linux/types.h> 16 #include <linux/sizes.h> 17 #include <time.h> 18 19 /* 20 * MMIO lives after RAM, but it'd be nice if it didn't constantly move. 21 * Choose a suitably high address, e.g. 63T... This limits RAM size. 22 */ 23 #define PPC_MMIO_START 0x3F0000000000UL 24 #define PPC_MMIO_SIZE 0x010000000000UL 25 26 #define KERNEL_LOAD_ADDR 0x0000000000000000 27 #define KERNEL_START_ADDR 0x0000000000000000 28 #define KERNEL_SECONDARY_START_ADDR 0x0000000000000060 29 #define INITRD_LOAD_ADDR 0x0000000002800000 30 31 #define RTAS_MAX_SIZE 0x10000 32 33 #define TIMEBASE_FREQ 512000000ULL 34 35 #define KVM_MMIO_START PPC_MMIO_START 36 37 /* 38 * This is the address that pci_get_io_port_block() starts allocating 39 * from. Note that this is a PCI bus address. 40 */ 41 #define KVM_IOPORT_AREA 0x0 42 #define KVM_PCI_CFG_AREA 0x1000000 43 #define KVM_PCI_MMIO_AREA 0x2000000 44 #define KVM_VIRTIO_MMIO_AREA 0x3000000 45 46 #define KVM_IRQ_OFFSET 16 47 48 #define KVM_VM_TYPE 0 49 50 #define KVM_IOEVENTFD_HAS_PIO 0 51 52 #define MAX_PAGE_SIZE SZ_256K 53 54 struct spapr_phb; 55 56 struct kvm_arch { 57 u64 sdr1; 58 u32 pvr; 59 unsigned long rtas_gra; 60 unsigned long rtas_size; 61 unsigned long fdt_gra; 62 unsigned long initrd_gra; 63 unsigned long initrd_size; 64 struct icp_state *icp; 65 struct spapr_phb *phb; 66 }; 67 68 #endif /* KVM__KVM_ARCH_H */ 69