mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
parent
db45a0d10d
commit
1c99ee951a
@ -22,6 +22,7 @@
|
||||
/* base-hw includes */
|
||||
#include <page_flags.h>
|
||||
#include <page_slab.h>
|
||||
#include <processor_driver.h>
|
||||
|
||||
namespace Arm
|
||||
{
|
||||
@ -184,7 +185,7 @@ class Arm::Section_table
|
||||
access_t v = access_permission_bits<Small_page>(flags);
|
||||
v |= memory_region_attr<Small_page>(flags);
|
||||
v |= Ng::bits(!flags.global);
|
||||
v |= S::bits(1);
|
||||
v |= S::bits(Processor_driver::is_smp());
|
||||
v |= Pa::masked(pa);
|
||||
Descriptor::type(v, Descriptor::SMALL_PAGE);
|
||||
return v;
|
||||
@ -447,7 +448,7 @@ class Arm::Section_table
|
||||
access_t v = access_permission_bits<Section>(flags);
|
||||
v |= memory_region_attr<Section>(flags);
|
||||
v |= Domain::bits(DOMAIN);
|
||||
v |= S::bits(1);
|
||||
v |= S::bits(Processor_driver::is_smp());
|
||||
v |= Ng::bits(!flags.global);
|
||||
v |= Pa::masked(pa);
|
||||
Descriptor::type(v, Descriptor::SECTION);
|
||||
|
@ -699,6 +699,11 @@ namespace Arm
|
||||
base = base & LINE_ALIGNM_MASK;
|
||||
for (; base < top; base += LINE_SIZE) { Icimvau::write(base); }
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the processor support multiple cores
|
||||
*/
|
||||
static bool is_smp() { return PROCESSORS > 1; }
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ namespace Arm_v6
|
||||
|
||||
static void start_secondary_processors(void * const ip)
|
||||
{
|
||||
if (PROCESSORS > 1) { PERR("multiprocessing not implemented"); }
|
||||
if (is_smp()) { PERR("multiprocessing not implemented"); }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -359,7 +359,7 @@ namespace Arm_v7
|
||||
*/
|
||||
static void start_secondary_processors(void * const ip)
|
||||
{
|
||||
if (PROCESSORS > 1) {
|
||||
if (is_smp()) {
|
||||
Genode::Board::secondary_processors_ip(ip);
|
||||
data_synchronization_barrier();
|
||||
asm volatile ("sev\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user