File tree Expand file tree Collapse file tree 5 files changed +73
-0
lines changed Expand file tree Collapse file tree 5 files changed +73
-0
lines changed Original file line number Diff line number Diff line change 66#include <bao.h>
77#include <cpu.h>
88#include <vm.h>
9+ #include <mem.h>
910#include <platform.h>
1011
1112__attribute__((used )) static void cpu_defines (void )
@@ -16,13 +17,18 @@ __attribute__((used)) static void cpu_defines(void)
1617 DEFINE_SIZE (CPU_STACK_SIZE , ((struct cpu * )NULL )-> stack );
1718
1819 DEFINE_OFFSET (CPU_VCPU_OFF , struct cpu , vcpu );
20+ DEFINE_OFFSET (CPU_AS_ARCH_MASK_OFF , struct cpu , as .arch .entry_mask );
21+ DEFINE_OFFSET (CPU_ARCH_PROFILE_MPU_LOCKED_OFF , struct cpu , arch .profile .mpu .locked );
1922}
2023
2124__attribute__((used )) static void vcpu_defines (void )
2225{
2326 DEFINE_SIZE (VCPU_ARCH_SIZE , struct vcpu_arch );
2427 DEFINE_OFFSET (VCPU_REGS_OFF , struct vcpu , regs );
28+ DEFINE_OFFSET (VCPU_VM_OFF , struct vcpu , vm );
2529 DEFINE_SIZE (VCPU_REGS_SIZE , struct arch_regs );
30+
31+ DEFINE_OFFSET (VM_AS_ARCH_MASK_OFF , struct vm , as .arch .entry_mask );
2632}
2733
2834__attribute__((used )) static void platform_defines (void )
Original file line number Diff line number Diff line change 1+ ../fvp-r/inc
Original file line number Diff line number Diff line change 1+ /**
2+ * SPDX-License-Identifier: Apache-2.0
3+ * Copyright (c) Bao Project and Contributors. All rights reserved.
4+ */
5+
6+ #include <platform.h>
7+
8+ struct platform platform = {
9+
10+ .cpu_num = 2 ,
11+ .cpu_master_fixed = true,
12+ .cpu_master = 0 ,
13+
14+ .region_num = 1 ,
15+ .regions = (struct mem_region []) {
16+ {
17+ // DRAM, 0GB-2GB
18+ .base = 0x20000000 ,
19+ .size = 0x80000000 ,
20+ }
21+ },
22+
23+ .console = {
24+ //.base = 0xE7C00000, // UART LLPP //MAYBE
25+ .base = 0xE0205000 , // UART0
26+ },
27+
28+ .arch = {
29+ .gic = {
30+ //GIC DISTRIBUTOR 0xF0000000
31+ .gicd_addr = 0xF0000000 ,
32+ //.gicc_addr = 0xAC000000,
33+ //.gich_addr = 0xAC010000,
34+ //.gicv_addr = 0xAC02F000,
35+ .gicr_addr = 0xF0100000 ,
36+ .maintenance_id = 25 ,
37+ },
38+
39+ .generic_timer = {
40+ .base_addr = 0xE0101000 , //DUAL TIMER ??
41+ },
42+ },
43+
44+ };
Original file line number Diff line number Diff line change 1+ # # SPDX-License-Identifier: Apache-2.0
2+ # # Copyright (c) Bao Project and Contributors. All rights reserved.
3+
4+ boards-objs-y+ =mps3_desc.o
Original file line number Diff line number Diff line change 1+ # # SPDX-License-Identifier: Apache-2.0
2+ # # Copyright (c) Bao Project and Contributors. All rights reserved.
3+
4+
5+ ARCH: =armv8
6+ ARCH_SUB: =aarch32
7+ ARCH_PROFILE: =armv8-r
8+
9+ GIC_VERSION: =GICV3
10+
11+ drivers = dummy_uart
12+
13+ platform_description: =mps3_desc.c
14+
15+ platform-cppflags =
16+ platform-cflags = -gdwarf-4
17+ platform-asflags =
18+ platform-ldflags =
You can’t perform that action at this time.
0 commit comments