2016-11-07 18:00:24 +01:00
|
|
|
/*
|
|
|
|
* \brief Parts of platform that are specific to Pandaboard
|
|
|
|
* \author Stefan Kalkowski
|
|
|
|
* \date 2017-01-30
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 Genode Labs GmbH
|
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 13:23:52 +01:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2016-11-07 18:00:24 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <platform.h>
|
|
|
|
|
2017-04-28 15:27:26 +02:00
|
|
|
using namespace Board;
|
|
|
|
|
2017-02-21 13:46:59 +01:00
|
|
|
Bootstrap::Platform::Board::Board()
|
2016-11-07 18:00:24 +01:00
|
|
|
: early_ram_regions(Memory_region { RAM_0_BASE, RAM_0_SIZE }),
|
|
|
|
core_mmio(Memory_region { CORTEX_A9_PRIVATE_MEM_BASE,
|
|
|
|
CORTEX_A9_PRIVATE_MEM_SIZE },
|
|
|
|
Memory_region { TL16C750_3_MMIO_BASE,
|
|
|
|
TL16C750_MMIO_SIZE },
|
|
|
|
Memory_region { PL310_MMIO_BASE,
|
|
|
|
PL310_MMIO_SIZE }) { }
|
|
|
|
|
|
|
|
|
2019-07-10 15:00:33 +02:00
|
|
|
bool Board::Cpu::errata(Board::Cpu::Errata) { return false; }
|
2016-11-07 18:00:24 +01:00
|
|
|
|
|
|
|
|
2019-07-10 15:00:33 +02:00
|
|
|
void Board::Cpu::wake_up_all_cpus(void * const ip)
|
2016-11-07 18:00:24 +01:00
|
|
|
{
|
2017-02-21 13:46:59 +01:00
|
|
|
struct Wakeup_generator : Genode::Mmio
|
|
|
|
{
|
|
|
|
struct Aux_core_boot_0 : Register<0x800, 32> {
|
|
|
|
struct Cpu1_status : Bitfield<2, 2> { }; };
|
|
|
|
|
|
|
|
struct Aux_core_boot_1 : Register<0x804, 32> { };
|
|
|
|
|
2017-04-28 15:27:26 +02:00
|
|
|
Wakeup_generator(void * const ip) : Mmio(CORTEX_A9_WUGEN_MMIO_BASE)
|
2017-02-21 13:46:59 +01:00
|
|
|
{
|
2019-07-10 15:00:33 +02:00
|
|
|
write<Aux_core_boot_1>((Genode::addr_t)ip);
|
2017-02-21 13:46:59 +01:00
|
|
|
write<Aux_core_boot_0::Cpu1_status>(1);
|
|
|
|
}
|
2016-11-07 18:00:24 +01:00
|
|
|
};
|
|
|
|
|
2017-02-21 13:46:59 +01:00
|
|
|
Wakeup_generator wgen(ip);
|
|
|
|
asm volatile("dsb\n"
|
|
|
|
"sev\n");
|
2016-11-07 18:00:24 +01:00
|
|
|
}
|