The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Misc ARM declarations |
| 3 | * |
| 4 | * Copyright (c) 2006 CodeSourcery. |
| 5 | * Written by Paul Brook |
| 6 | * |
| 7 | * This code is licenced under the LGPL. |
| 8 | * |
| 9 | */ |
| 10 | |
| 11 | #ifndef ARM_MISC_H |
| 12 | #define ARM_MISC_H 1 |
| 13 | |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 14 | /* The CPU is also modeled as an interrupt controller. */ |
| 15 | #define ARM_PIC_CPU_IRQ 0 |
| 16 | #define ARM_PIC_CPU_FIQ 1 |
| 17 | qemu_irq *arm_pic_init_cpu(CPUState *env); |
| 18 | |
| 19 | /* armv7m.c */ |
| 20 | qemu_irq *armv7m_init(int flash_size, int sram_size, |
| 21 | const char *kernel_filename, const char *cpu_model); |
| 22 | |
| 23 | /* arm_boot.c */ |
| 24 | struct arm_boot_info { |
| 25 | int ram_size; |
| 26 | const char *kernel_filename; |
| 27 | const char *kernel_cmdline; |
| 28 | const char *initrd_filename; |
| 29 | target_phys_addr_t loader_start; |
David 'Digit' Turner | 5d8f37a | 2009-09-14 14:32:27 -0700 | [diff] [blame] | 30 | target_phys_addr_t smp_loader_start; |
David Turner | a253513 | 2010-09-10 10:15:07 +0200 | [diff] [blame] | 31 | target_phys_addr_t smp_priv_base; |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 32 | int nb_cpus; |
| 33 | int board_id; |
| 34 | int (*atag_board)(struct arm_boot_info *info, void *p); |
David Turner | a253513 | 2010-09-10 10:15:07 +0200 | [diff] [blame] | 35 | /* Used internally by arm_boot.c */ |
| 36 | int is_linux; |
| 37 | target_phys_addr_t initrd_size; |
| 38 | target_phys_addr_t entry; |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 39 | }; |
| 40 | void arm_load_kernel(CPUState *env, struct arm_boot_info *info); |
| 41 | |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 42 | /* Multiplication factor to convert from system clock ticks to qemu timer |
| 43 | ticks. */ |
David 'Digit' Turner | 5d8f37a | 2009-09-14 14:32:27 -0700 | [diff] [blame] | 44 | extern int system_clock_scale; |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 45 | |
| 46 | #endif /* !ARM_MISC_H */ |