Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
octopOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
weip00
octopOS
Commits
a7ef6491
Commit
a7ef6491
authored
3 years ago
by
Paul Weiß (Poohl)
Browse files
Options
Downloads
Patches
Plain Diff
Not 1:1 mapping
parent
a03a7ffd
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/u6_demo.c
+13
-3
13 additions, 3 deletions
apps/u6_demo.c
boards/portux/board.h
+2
-0
2 additions, 0 deletions
boards/portux/board.h
boards/portux/drivers/mmu.c
+2
-0
2 additions, 0 deletions
boards/portux/drivers/mmu.c
with
17 additions
and
3 deletions
apps/u6_demo.c
+
13
−
3
View file @
a7ef6491
...
@@ -13,10 +13,13 @@ char intro[] =
...
@@ -13,10 +13,13 @@ char intro[] =
"3: Execute Kernel code
\r\n
"
"3: Execute Kernel code
\r\n
"
"4: Write own code
\r\n
"
"4: Write own code
\r\n
"
"5: Stackoverflow
\r\n
"
"5: Stackoverflow
\r\n
"
"6: read undefined memeory
\r\n
"
;
"6: read undefined memeory
\r\n
"
"7: Access Sram that was mapped to undef (abort)
\r\n
"
"8: Access Undef (abort) that was mapped to sram
\r\n
"
;
__attribute__
((
section
(
".usertext"
)))
int
brick_it
()
{
__attribute__
((
section
(
".usertext"
)))
int
brick_it
()
{
for
(
int
i
=
0
;
i
<
190
;
++
i
)
while
(
1
)
{
for
(
int
i
=
0
;
i
<
287
;
++
i
)
sys_debug_put_char
(
intro
[
i
]);
sys_debug_put_char
(
intro
[
i
]);
volatile
u32
test
;
volatile
u32
test
;
switch
(
sys_debug_get_char
())
{
switch
(
sys_debug_get_char
())
{
...
@@ -56,7 +59,14 @@ __attribute__ ((section (".usertext"))) int brick_it() {
...
@@ -56,7 +59,14 @@ __attribute__ ((section (".usertext"))) int brick_it() {
);
);
break
;
break
;
case
'6'
:
case
'6'
:
test
=
*
((
u32
*
)
UNDEF_MEMORY1
+
200
);
test
=
*
((
u32
*
)
(
UNDEF_MEMORY1
+
MEGABYTE
+
200
)
)
;
break
;
break
;
case
'7'
:
test
=
*
((
u32
*
)
(
EXTERNAL_SRAM
+
17
*
MEGABYTE
));
break
;
case
'8'
:
test
=
*
((
u32
*
)
(
UNDEF_MEMORY1
));
break
;
}
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
boards/portux/board.h
+
2
−
0
View file @
a7ef6491
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
#define INTERNAL_SRAM 0x200000
#define INTERNAL_SRAM 0x200000
#define MEGABYTE 0x100000
#define EXTERNAL_SRAM 0x20000000
#define EXTERNAL_SRAM 0x20000000
#define PROCESS_STACKS 0x20200000
#define PROCESS_STACKS 0x20200000
#define UNDEF_MEMORY1 0x90000000
#define UNDEF_MEMORY1 0x90000000
...
...
This diff is collapsed.
Click to expand it.
boards/portux/drivers/mmu.c
+
2
−
0
View file @
a7ef6491
...
@@ -21,6 +21,8 @@ void init_first_level_pagetable() {
...
@@ -21,6 +21,8 @@ void init_first_level_pagetable() {
for
(
uint
i
=
0
;
i
<
63
;
++
i
)
{
for
(
uint
i
=
0
;
i
<
63
;
++
i
)
{
l1table
.
desc
[
userland_desc
+
1
+
i
]
|=
(
AP_RW_RW
<<
10
);
l1table
.
desc
[
userland_desc
+
1
+
i
]
|=
(
AP_RW_RW
<<
10
);
}
}
l1table
.
desc
[(
EXTERNAL_SRAM
+
17
*
MEGABYTE
)
>>
20
]
=
(
UNDEF_MEMORY1
)
|
(
AP_RW_RW
<<
10
)
|
0
b10
;
l1table
.
desc
[(
UNDEF_MEMORY1
)
>>
20
]
=
(
EXTERNAL_SRAM
+
17
*
MEGABYTE
)
|
(
AP_RW_RW
<<
10
)
|
0
b10
;
}
}
void
init_mmu
()
{
void
init_mmu
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment