Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/core/mpu/inc/mem_prot/mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ struct mp_region {
struct addr_space {
asid_t id;
enum AS_TYPE type;
cpumap_t cpus;
colormap_t colors;
struct addr_space_arch arch;
struct {
Expand All @@ -41,7 +40,7 @@ struct addr_space {
spinlock_t lock;
};

void as_init(struct addr_space* as, enum AS_TYPE type, asid_t id, cpumap_t cpus, colormap_t colors);
void as_init(struct addr_space* as, enum AS_TYPE type, asid_t id, colormap_t colors);

static inline bool mem_regions_overlap(struct mp_region* reg1, struct mp_region* reg2)
{
Expand Down
5 changes: 2 additions & 3 deletions src/core/mpu/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static void mem_init_boot_regions(void)
void mem_prot_init()
{
mpu_init();
as_init(&cpu()->as, AS_HYP, HYP_ASID, BIT_MASK(0, PLAT_CPU_NUM), 0);
as_init(&cpu()->as, AS_HYP, HYP_ASID, 0);
mem_init_boot_regions();
mpu_enable();
}
Expand All @@ -214,14 +214,13 @@ size_t mem_cpu_boot_alloc_size()
return size;
}

void as_init(struct addr_space* as, enum AS_TYPE type, asid_t id, cpumap_t cpus, colormap_t colors)
void as_init(struct addr_space* as, enum AS_TYPE type, asid_t id, colormap_t colors)
{
UNUSED_ARG(colors);

as->type = type;
as->colors = 0;
as->id = id;
as->cpus = cpus;
as->lock = SPINLOCK_INITVAL;
as_arch_init(as);

Expand Down
2 changes: 1 addition & 1 deletion src/core/mpu/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ void vm_mem_prot_init(struct vm* vm, const struct vm_config* config)
{
UNUSED_ARG(config);

as_init(&vm->as, AS_VM, vm->id, vm->cpus, 0);
as_init(&vm->as, AS_VM, vm->id, 0);
}
1 change: 0 additions & 1 deletion src/core/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ static void vm_cpu_init(struct vm* vm)
{
spin_lock(&vm->lock);
vm->cpus |= (1UL << cpu()->id);
vm->as.cpus |= (1UL << cpu()->id);
spin_unlock(&vm->lock);
}

Expand Down