Skip to content

Commit 9385a84

Browse files
ref(format): Fix formatting
Signed-off-by: Miguel Silva <[email protected]>
1 parent 448f66b commit 9385a84

File tree

3 files changed

+26
-25
lines changed

3 files changed

+26
-25
lines changed

src/arch/armv8/armv8-r/inc/arch/mpu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ struct mpu_arch {
2929
// bool mpu_add_region(struct mp_region* reg, bool locked);
3030
// bool mpu_remove_region(struct mp_region* reg);
3131
// bool mpu_update_region(struct mp_region* reg);
32-
bool mpu_perms_compatible(uint32_t perms1, uint32_t perms2);
32+
bool mpu_perms_compatible(unsigned long perms1, unsigned long perms2);
3333

3434
#endif /* __ARCH_MPU_H__ */

src/arch/armv8/armv8-r/mpu.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ struct cpu* CPU_TEMP;
1616

1717
struct MPU_TEMP {
1818
// regs
19-
uint32_t HMPUIR;
20-
uint32_t HPRBAR[NUM_ENTRIES];
21-
uint32_t HPRENR;
22-
uint32_t HPRLAR[NUM_ENTRIES];
23-
uint32_t HPRSELR;
24-
uint32_t MPUIR;
25-
uint32_t PRBAR[NUM_ENTRIES];
26-
uint32_t PRENR;
27-
uint32_t PRLAR[NUM_ENTRIES];
28-
uint32_t PRSELR;
29-
uint32_t VSCTLR;
30-
31-
uint32_t EL2_EN;
32-
uint32_t EL1_EN;
33-
uint32_t EL2_LOCKED;
19+
unsigned long HMPUIR;
20+
unsigned long HPRBAR[NUM_ENTRIES];
21+
unsigned long HPRENR;
22+
unsigned long HPRLAR[NUM_ENTRIES];
23+
unsigned long HPRSELR;
24+
unsigned long MPUIR;
25+
unsigned long PRBAR[NUM_ENTRIES];
26+
unsigned long PRENR;
27+
unsigned long PRLAR[NUM_ENTRIES];
28+
unsigned long PRSELR;
29+
unsigned long VSCTLR;
30+
31+
unsigned long EL2_EN;
32+
unsigned long EL1_EN;
33+
unsigned long EL2_LOCKED;
3434
} mpu_temp;
3535

3636
void mpu_temp_update(void)
@@ -69,10 +69,10 @@ static mpid_t mpu_find_region(struct mp_region* mpr)
6969
if (cpu()->arch.profile.mpu.bitmap & BIT(i)) {
7070
sysreg_prselr_el2_write(i);
7171
ISB();
72-
uint32_t hw_base = (sysreg_prbar_el2_read() & PRBAR_BASE_MSK);
73-
uint32_t hw_limit = (sysreg_prlar_el2_read() & PRLAR_LIMIT_MSK);
74-
uint32_t sw_base = (mpr->base & PRBAR_BASE_MSK);
75-
uint32_t sw_limit = ((mpr->base + mpr->size - 1) & PRLAR_LIMIT_MSK);
72+
unsigned long hw_base = (sysreg_prbar_el2_read() & PRBAR_BASE_MSK);
73+
unsigned long hw_limit = (sysreg_prlar_el2_read() & PRLAR_LIMIT_MSK);
74+
unsigned long sw_base = (mpr->base & PRBAR_BASE_MSK);
75+
unsigned long sw_limit = ((mpr->base + mpr->size - 1) & PRLAR_LIMIT_MSK);
7676
if ((hw_base == sw_base) && (hw_limit == sw_limit)) {
7777
reg_num = i;
7878
break;
@@ -216,13 +216,13 @@ bool mpu_update(struct addr_space* as, struct mp_region* mpr)
216216
return true;
217217
}
218218

219-
220-
bool mpu_perms_compatible(uint32_t perms1, uint32_t perms2) {
221-
//TODO
219+
bool mpu_perms_compatible(unsigned long perms1, unsigned long perms2)
220+
{
221+
// TODO
222222
UNUSED_ARG(perms1);
223223
UNUSED_ARG(perms2);
224224
return true;
225-
}
225+
}
226226

227227
void mpu_enable(void) { }
228228

src/core/mpu/mem.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ void mem_vmpu_coalesce_contiguous(struct addr_space* as, bool broadcast, bool lo
443443
prev_reg = mem_vmpu_get_entry(as, prev->mpid);
444444

445445
bool contiguous = prev_reg->region.base + prev_reg->region.size == cur_reg->region.base;
446-
bool perms_compatible = mpu_perms_compatible(prev_reg->region.mem_flags.raw, cur_reg->region.mem_flags.raw);
446+
bool perms_compatible =
447+
mpu_perms_compatible(prev_reg->region.mem_flags.raw, cur_reg->region.mem_flags.raw);
447448
bool lock_compatible = prev_reg->lock == cur_reg->lock;
448449
if (contiguous && perms_compatible && lock_compatible) {
449450
cur_mpid = cur->mpid;

0 commit comments

Comments
 (0)