Lines Matching +full:bcm2835 +full:- +full:mbox

12  * See the COPYING file in the top-level directory.
24 #include "qemu/error-report.h"
30 #define TYPE_RASPI_MACHINE MACHINE_TYPE_NAME("raspi-common")
49 * www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/
122 { 0xe59f5014 }, /* ldr r5, =0x400000CC ;load mbox base */ in write_smpboot()
124 { 0xe7953200 }, /* ldr r3, [r5, r0, lsl #4] ;read mbox for our core */ in write_smpboot()
127 { 0xe7853200 }, /* str r3, [r5, r0, lsl #4] ;clear mbox */ in write_smpboot()
141 info->smp_loader_start, smpboot, fixupcontext); in write_smpboot()
148 * The mechanism for doing the spin-table is also entirely different. in write_smpboot64()
149 * We must have four 64-bit fields at absolute addresses in write_smpboot64()
175 arm_write_bootloader("raspi_smpboot", as, info->smp_loader_start, in write_smpboot64()
189 cpu_set_pc(cs, info->smp_loader_start); in reset_secondary()
198 s->binfo.ram_size = ram_size; in setup_boot()
202 * The BCM2835 and BCM2836 require some custom setup code to run in setup_boot()
204 * so that we get a no-op SMC; this is used by Linux to call the in setup_boot()
208 s->binfo.board_setup_addr = BOARDSETUP_ADDR; in setup_boot()
209 s->binfo.write_board_setup = write_board_setup; in setup_boot()
210 s->binfo.secure_board_setup = true; in setup_boot()
211 s->binfo.secure_boot = true; in setup_boot()
216 s->binfo.smp_loader_start = SMPBOOT_ADDR; in setup_boot()
218 s->binfo.write_secondary_boot = write_smpboot; in setup_boot()
220 s->binfo.write_secondary_boot = write_smpboot64; in setup_boot()
222 s->binfo.secondary_cpu_reset_hook = reset_secondary; in setup_boot()
228 if (machine->firmware) { in setup_boot()
232 r = load_image_targphys(machine->firmware, firmware_addr, in setup_boot()
233 ram_size - firmware_addr); in setup_boot()
235 error_report("Failed to load firmware from %s", machine->firmware); in setup_boot()
239 s->binfo.entry = firmware_addr; in setup_boot()
240 s->binfo.firmware_loaded = true; in setup_boot()
243 arm_load_kernel(cpu, machine, &s->binfo); in setup_boot()
250 uint32_t board_rev = mc->board_rev; in raspi_base_machine_init()
259 if (machine->ram_size != ram_size) { in raspi_base_machine_init()
268 machine->ram, 0); in raspi_base_machine_init()
271 object_property_add_const_link(OBJECT(soc), "ram", OBJECT(machine->ram)); in raspi_base_machine_init()
272 object_property_set_int(OBJECT(soc), "board-rev", board_rev, in raspi_base_machine_init()
274 object_property_set_str(OBJECT(soc), "command-line", in raspi_base_machine_init()
275 machine->kernel_cmdline, &error_abort); in raspi_base_machine_init()
281 bus = qdev_get_child_bus(DEVICE(soc), "sd-bus"); in raspi_base_machine_init()
290 vcram_size = object_property_get_uint(OBJECT(soc), "vcram-size", in raspi_base_machine_init()
292 vcram_base = object_property_get_uint(OBJECT(soc), "vcram-base", in raspi_base_machine_init()
296 vcram_base = ram_size - vcram_size; in raspi_base_machine_init()
298 boot_ram_size = MIN(vcram_base, UPPER_RAM_BASE - vcram_size); in raspi_base_machine_init()
300 setup_boot(machine, &soc->cpu[0].core, board_processor_id(board_rev), in raspi_base_machine_init()
309 BCM283XState *soc = &s->soc; in raspi_machine_init()
311 s_base->binfo.board_id = MACH_TYPE_BCM2708; in raspi_machine_init()
314 board_soc_type(mc->board_rev)); in raspi_machine_init()
315 raspi_base_machine_init(machine, &soc->parent_obj); in raspi_machine_init()
321 mc->desc = g_strdup_printf("Raspberry Pi %s (revision 1.%u)", in raspi_machine_class_common_init()
324 mc->block_default_type = IF_SD; in raspi_machine_class_common_init()
325 mc->no_parallel = 1; in raspi_machine_class_common_init()
326 mc->no_floppy = 1; in raspi_machine_class_common_init()
327 mc->no_cdrom = 1; in raspi_machine_class_common_init()
328 mc->default_cpus = mc->min_cpus = mc->max_cpus = cores_count(board_rev); in raspi_machine_class_common_init()
329 mc->default_ram_size = board_ram_size(board_rev); in raspi_machine_class_common_init()
330 mc->default_ram_id = "ram"; in raspi_machine_class_common_init()
337 mc->init = raspi_machine_init; in raspi_machine_class_init()
345 rmc->board_rev = 0x920092; /* Revision 1.2 */ in raspi0_machine_class_init()
346 raspi_machine_class_init(mc, rmc->board_rev); in raspi0_machine_class_init()
354 rmc->board_rev = 0x900021; /* Revision 1.1 */ in raspi1ap_machine_class_init()
355 raspi_machine_class_init(mc, rmc->board_rev); in raspi1ap_machine_class_init()
363 rmc->board_rev = 0xa21041; in raspi2b_machine_class_init()
364 raspi_machine_class_init(mc, rmc->board_rev); in raspi2b_machine_class_init()
373 rmc->board_rev = 0x9020e0; /* Revision 1.0 */ in raspi3ap_machine_class_init()
374 raspi_machine_class_init(mc, rmc->board_rev); in raspi3ap_machine_class_init()
382 rmc->board_rev = 0xa02082; in raspi3b_machine_class_init()
383 raspi_machine_class_init(mc, rmc->board_rev); in raspi3b_machine_class_init()