Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MINOTAuR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
MINOTAuR
MINOTAuR
Commits
e0a71ea0
Commit
e0a71ea0
authored
6 years ago
by
Michael Schaffner
Committed by
Florian Zaruba
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Output more status info in zsbl for OpenPiton
parent
a5f3184a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
openpiton/bootrom/linux/src/sd.c
+9
-0
9 additions, 0 deletions
openpiton/bootrom/linux/src/sd.c
openpiton/bootrom/linux/src/uart.c
+19
-1
19 additions, 1 deletion
openpiton/bootrom/linux/src/uart.c
openpiton/bootrom/linux/src/uart.h
+2
-0
2 additions, 0 deletions
openpiton/bootrom/linux/src/uart.h
with
30 additions
and
1 deletion
openpiton/bootrom/linux/src/sd.c
+
9
−
0
View file @
e0a71ea0
...
@@ -23,6 +23,15 @@ int sd_copy(void *dst, uint32_t src_lba, uint32_t size)
...
@@ -23,6 +23,15 @@ int sd_copy(void *dst, uint32_t src_lba, uint32_t size)
uint64_t
*
addr
=
(
uint64_t
*
)
raw_addr
;
uint64_t
*
addr
=
(
uint64_t
*
)
raw_addr
;
volatile
uint64_t
*
p
=
(
uint64_t
*
)
dst
;
volatile
uint64_t
*
p
=
(
uint64_t
*
)
dst
;
for
(
uint32_t
blk
=
0
;
blk
<
size
;
blk
++
)
{
for
(
uint32_t
blk
=
0
;
blk
<
size
;
blk
++
)
{
if
(
blk
%
100
==
0
)
{
print_uart
(
"copying block "
);
print_uart_dec
(
blk
,
1
);
print_uart
(
" of "
);
print_uart_dec
(
size
,
1
);
print_uart
(
" blocks ("
);
print_uart_dec
((
blk
*
100
)
/
size
,
1
);
print_uart
(
" %)
\r\n
"
);
}
for
(
uint32_t
offset
=
0
;
offset
<
64
;
offset
++
)
{
for
(
uint32_t
offset
=
0
;
offset
<
64
;
offset
++
)
{
*
(
p
++
)
=
*
(
addr
++
);
*
(
p
++
)
=
*
(
addr
++
);
}
}
...
...
This diff is collapsed.
Click to expand it.
openpiton/bootrom/linux/src/uart.c
+
19
−
1
View file @
e0a71ea0
...
@@ -55,6 +55,24 @@ void bin_to_hex(uint8_t inp, uint8_t res[2])
...
@@ -55,6 +55,24 @@ void bin_to_hex(uint8_t inp, uint8_t res[2])
return
;
return
;
}
}
void
print_uart_dec
(
uint32_t
val
,
uint32_t
digits
)
{
int
i
;
uint32_t
k
=
1000000000
;
for
(
i
=
9
;
i
>
-
1
;
i
--
)
{
uint32_t
cur
=
val
/
k
;
val
-=
cur
*
k
;
k
/=
10
;
if
(
cur
||
(
i
<
digits
))
{
digits
=
i
;
uint8_t
dec
;
dec
=
bin_to_hex_table
[
cur
&
0xf
];
write_serial
(
dec
);
}
}
}
void
print_uart_int
(
uint32_t
addr
)
void
print_uart_int
(
uint32_t
addr
)
{
{
int
i
;
int
i
;
...
@@ -87,4 +105,4 @@ void print_uart_byte(uint8_t byte)
...
@@ -87,4 +105,4 @@ void print_uart_byte(uint8_t byte)
bin_to_hex
(
byte
,
hex
);
bin_to_hex
(
byte
,
hex
);
write_serial
(
hex
[
0
]);
write_serial
(
hex
[
0
]);
write_serial
(
hex
[
1
]);
write_serial
(
hex
[
1
]);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
openpiton/bootrom/linux/src/uart.h
+
2
−
0
View file @
e0a71ea0
...
@@ -20,6 +20,8 @@ void init_uart();
...
@@ -20,6 +20,8 @@ void init_uart();
void
print_uart
(
const
char
*
str
);
void
print_uart
(
const
char
*
str
);
void
print_uart_dec
(
uint32_t
val
,
uint32_t
digits
);
void
print_uart_int
(
uint32_t
addr
);
void
print_uart_int
(
uint32_t
addr
);
void
print_uart_addr
(
uint64_t
addr
);
void
print_uart_addr
(
uint64_t
addr
);
...
...
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