File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,15 @@ int main() {
1414
1515 printf ("#define PLAT_CPU_NUM (%ld)\n" , platform .cpu_num );
1616 printf ("#define PLAT_BASE_ADDR (0x%lx)\n" , platform .regions [0 ].base );
17+
18+ for (size_t i = 1 ; i < platform .region_num ; i ++ )
19+ {
20+ if (platform .regions [i ].perms == RWX )
21+ {
22+ printf ("#define PLAT_DATA_MEM (0x%lx)\n" , platform .regions [i ].base );
23+ break ;
24+ }
25+ }
1726 if (platform .cpu_master_fixed ) {
1827 printf ("#define CPU_MASTER_FIXED (%ld)\n" , platform .cpu_master );
1928 }
Original file line number Diff line number Diff line change 1515
1616#ifndef __ASSEMBLER__
1717
18+ enum MEM_PERMISSIONS {
19+ RWX ,
20+ RX ,
21+ };
22+
1823struct ppages {
1924 paddr_t base ;
2025 size_t num_pages ;
@@ -34,6 +39,7 @@ struct page_pool {
3439struct mem_region {
3540 paddr_t base ;
3641 size_t size ;
42+ enum MEM_PERMISSIONS perms ;
3743 struct page_pool page_pool ;
3844};
3945
You can’t perform that action at this time.
0 commit comments