Skip to content

Commit

Permalink
Co Pro RISC-V: Fix wrong syscall number in *PI command
Browse files Browse the repository at this point in the history
Change-Id: Icd81a6b9a607b1e3db3ef2799b0497a699db31cf
  • Loading branch information
hoglet67 committed Sep 9, 2023
1 parent 5b2601a commit 3852dd0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 33 deletions.
65 changes: 33 additions & 32 deletions src/riscv/tuberom.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ unsigned char tuberom_riscv_bin[] = {
0x93, 0x88, 0x38, 0x00, 0x73, 0x00, 0x00, 0x00, 0x03, 0x25, 0x81, 0x00,
0xef, 0x00, 0xc0, 0x5a, 0xb7, 0x08, 0xac, 0x00, 0x93, 0x88, 0x58, 0x00,
0x73, 0x00, 0x00, 0x00, 0x03, 0x25, 0x81, 0x00, 0x93, 0x05, 0x00, 0x00,
0xef, 0x00, 0x90, 0x2f, 0xb7, 0x08, 0xac, 0x00, 0x93, 0x88, 0x58, 0x00,
0xef, 0x00, 0xd0, 0x2f, 0xb7, 0x08, 0xac, 0x00, 0x93, 0x88, 0x58, 0x00,
0x73, 0x00, 0x00, 0x00, 0x13, 0x05, 0x10, 0x00, 0x97, 0x05, 0x00, 0x00,
0x93, 0x85, 0xc5, 0x05, 0xb7, 0x08, 0xac, 0x00, 0x93, 0x88, 0x38, 0x00,
0x73, 0x00, 0x00, 0x00, 0x97, 0x05, 0x00, 0x00, 0x93, 0x85, 0x85, 0x04,
Expand Down Expand Up @@ -459,35 +459,36 @@ unsigned char tuberom_riscv_bin[] = {
0x65, 0x20, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x00, 0x00, 0x52, 0x65, 0x73,
0x65, 0x72, 0x76, 0x65, 0x64, 0x00, 0x00, 0x00, 0x93, 0x07, 0x05, 0x00,
0x93, 0x06, 0x40, 0x00, 0x13, 0x07, 0x80, 0x3e, 0x93, 0x05, 0x00, 0x03,
0x13, 0x06, 0xa0, 0x00, 0x63, 0xc8, 0xe7, 0x02, 0x13, 0x85, 0x05, 0x00,
0xb3, 0x87, 0xe7, 0x40, 0x13, 0x05, 0x15, 0x00, 0x13, 0x75, 0xf5, 0x0f,
0xe3, 0xda, 0xe7, 0xfe, 0x33, 0x47, 0xc7, 0x02, 0x93, 0x08, 0x40, 0x00,
0x73, 0x00, 0x00, 0x00, 0x93, 0x86, 0xf6, 0xff, 0xe3, 0x9c, 0x06, 0xfc,
0x67, 0x80, 0x00, 0x00, 0x13, 0x05, 0x00, 0x03, 0x6f, 0xf0, 0x5f, 0xfe,
0x13, 0x01, 0x01, 0xfe, 0x23, 0x2e, 0x11, 0x00, 0x23, 0x2c, 0x81, 0x00,
0x23, 0x2a, 0x91, 0x00, 0x23, 0x28, 0x21, 0x01, 0x23, 0x26, 0x31, 0x01,
0x23, 0x24, 0x41, 0x01, 0x93, 0x17, 0x35, 0x00, 0xb3, 0x87, 0xa7, 0x40,
0x13, 0xd9, 0xf7, 0x01, 0x33, 0x09, 0xf9, 0x00, 0x13, 0x07, 0x10, 0x00,
0x63, 0x5c, 0xf7, 0x0c, 0x13, 0x59, 0x19, 0x40, 0x13, 0x87, 0x45, 0x00,
0x93, 0x07, 0x10, 0x00, 0x93, 0x06, 0x00, 0x7d, 0x23, 0x20, 0xd7, 0x00,
0x93, 0x87, 0x17, 0x00, 0x13, 0x07, 0x47, 0x00, 0xe3, 0x5a, 0xf9, 0xfe,
0x93, 0x17, 0x29, 0x00, 0xb3, 0x89, 0xf5, 0x00, 0x13, 0x1a, 0x19, 0x00,
0x13, 0x0a, 0xfa, 0xff, 0x13, 0x09, 0xf9, 0xff, 0x13, 0x05, 0x00, 0x00,
0xb7, 0x24, 0x00, 0x00, 0x93, 0x84, 0x04, 0x71, 0x6f, 0x00, 0xc0, 0x05,
0xb3, 0x07, 0xd4, 0x02, 0x03, 0x27, 0xc6, 0xff, 0x33, 0x07, 0x97, 0x02,
0x33, 0x07, 0xf7, 0x00, 0x93, 0x97, 0x16, 0x00, 0x93, 0x87, 0xf7, 0xff,
0xb3, 0x65, 0xf7, 0x02, 0x23, 0x2e, 0xb6, 0xfe, 0x33, 0x44, 0xf7, 0x02,
0x93, 0x86, 0xf6, 0xff, 0x13, 0x06, 0xc6, 0xff, 0xe3, 0x9a, 0x06, 0xfc,
0xb3, 0x47, 0x94, 0x02, 0x33, 0x85, 0xa7, 0x00, 0xef, 0xf0, 0x5f, 0xf0,
0x33, 0x65, 0x94, 0x02, 0x93, 0x89, 0x89, 0xfc, 0x13, 0x0a, 0x4a, 0xfe,
0x93, 0x07, 0x29, 0xff, 0x13, 0x09, 0x39, 0xff, 0x63, 0x50, 0x20, 0x05,
0x13, 0x89, 0x07, 0x00, 0x83, 0xa7, 0x09, 0x00, 0xb3, 0x87, 0x97, 0x02,
0x33, 0xe7, 0x47, 0x03, 0x23, 0xa0, 0xe9, 0x00, 0x33, 0xc4, 0x47, 0x03,
0x93, 0x06, 0x09, 0x00, 0x63, 0x06, 0x09, 0x00, 0x13, 0x86, 0x09, 0x00,
0x6f, 0xf0, 0x9f, 0xf8, 0xb7, 0x27, 0x00, 0x00, 0x93, 0x87, 0x07, 0x71,
0xb3, 0x47, 0xf4, 0x02, 0x33, 0x85, 0xa7, 0x00, 0xef, 0xf0, 0x1f, 0xeb,
0x13, 0x05, 0x00, 0x00, 0x83, 0x20, 0xc1, 0x01, 0x03, 0x24, 0x81, 0x01,
0x83, 0x24, 0x41, 0x01, 0x03, 0x29, 0x01, 0x01, 0x83, 0x29, 0xc1, 0x00,
0x03, 0x2a, 0x81, 0x00, 0x13, 0x01, 0x01, 0x02, 0x67, 0x80, 0x00, 0x00
0x13, 0x06, 0xa0, 0x00, 0xb7, 0x08, 0xac, 0x00, 0x93, 0x88, 0x48, 0x00,
0x63, 0xc6, 0xe7, 0x02, 0x13, 0x85, 0x05, 0x00, 0xb3, 0x87, 0xe7, 0x40,
0x13, 0x05, 0x15, 0x00, 0x13, 0x75, 0xf5, 0x0f, 0xe3, 0xda, 0xe7, 0xfe,
0x33, 0x47, 0xc7, 0x02, 0x73, 0x00, 0x00, 0x00, 0x93, 0x86, 0xf6, 0xff,
0xe3, 0x9e, 0x06, 0xfc, 0x67, 0x80, 0x00, 0x00, 0x13, 0x05, 0x00, 0x03,
0x6f, 0xf0, 0x9f, 0xfe, 0x13, 0x01, 0x01, 0xfe, 0x23, 0x2e, 0x11, 0x00,
0x23, 0x2c, 0x81, 0x00, 0x23, 0x2a, 0x91, 0x00, 0x23, 0x28, 0x21, 0x01,
0x23, 0x26, 0x31, 0x01, 0x23, 0x24, 0x41, 0x01, 0x93, 0x17, 0x35, 0x00,
0xb3, 0x87, 0xa7, 0x40, 0x13, 0xd9, 0xf7, 0x01, 0x33, 0x09, 0xf9, 0x00,
0x13, 0x07, 0x10, 0x00, 0x63, 0x5c, 0xf7, 0x0c, 0x13, 0x59, 0x19, 0x40,
0x13, 0x87, 0x45, 0x00, 0x93, 0x07, 0x10, 0x00, 0x93, 0x06, 0x00, 0x7d,
0x23, 0x20, 0xd7, 0x00, 0x93, 0x87, 0x17, 0x00, 0x13, 0x07, 0x47, 0x00,
0xe3, 0x5a, 0xf9, 0xfe, 0x93, 0x17, 0x29, 0x00, 0xb3, 0x89, 0xf5, 0x00,
0x13, 0x1a, 0x19, 0x00, 0x13, 0x0a, 0xfa, 0xff, 0x13, 0x09, 0xf9, 0xff,
0x13, 0x05, 0x00, 0x00, 0xb7, 0x24, 0x00, 0x00, 0x93, 0x84, 0x04, 0x71,
0x6f, 0x00, 0xc0, 0x05, 0xb3, 0x07, 0xd4, 0x02, 0x03, 0x27, 0xc6, 0xff,
0x33, 0x07, 0x97, 0x02, 0x33, 0x07, 0xf7, 0x00, 0x93, 0x97, 0x16, 0x00,
0x93, 0x87, 0xf7, 0xff, 0xb3, 0x65, 0xf7, 0x02, 0x23, 0x2e, 0xb6, 0xfe,
0x33, 0x44, 0xf7, 0x02, 0x93, 0x86, 0xf6, 0xff, 0x13, 0x06, 0xc6, 0xff,
0xe3, 0x9a, 0x06, 0xfc, 0xb3, 0x47, 0x94, 0x02, 0x33, 0x85, 0xa7, 0x00,
0xef, 0xf0, 0x1f, 0xf0, 0x33, 0x65, 0x94, 0x02, 0x93, 0x89, 0x89, 0xfc,
0x13, 0x0a, 0x4a, 0xfe, 0x93, 0x07, 0x29, 0xff, 0x13, 0x09, 0x39, 0xff,
0x63, 0x50, 0x20, 0x05, 0x13, 0x89, 0x07, 0x00, 0x83, 0xa7, 0x09, 0x00,
0xb3, 0x87, 0x97, 0x02, 0x33, 0xe7, 0x47, 0x03, 0x23, 0xa0, 0xe9, 0x00,
0x33, 0xc4, 0x47, 0x03, 0x93, 0x06, 0x09, 0x00, 0x63, 0x06, 0x09, 0x00,
0x13, 0x86, 0x09, 0x00, 0x6f, 0xf0, 0x9f, 0xf8, 0xb7, 0x27, 0x00, 0x00,
0x93, 0x87, 0x07, 0x71, 0xb3, 0x47, 0xf4, 0x02, 0x33, 0x85, 0xa7, 0x00,
0xef, 0xf0, 0xdf, 0xea, 0x13, 0x05, 0x00, 0x00, 0x83, 0x20, 0xc1, 0x01,
0x03, 0x24, 0x81, 0x01, 0x83, 0x24, 0x41, 0x01, 0x03, 0x29, 0x01, 0x01,
0x83, 0x29, 0xc1, 0x00, 0x03, 0x2a, 0x81, 0x00, 0x13, 0x01, 0x01, 0x02,
0x67, 0x80, 0x00, 0x00
};
unsigned int tuberom_riscv_bin_len = 5880;
unsigned int tuberom_riscv_bin_len = 5884;
2 changes: 1 addition & 1 deletion src/riscv/tuberom_pi.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef __riscv
static int putchar(int c) {
register int a0 asm ("a0") = c;
register int a7 asm ("a7") = 4;
register int a7 asm ("a7") = 0xAC0004;
asm volatile ("ecall"
: "+r" (a0)
: "r" (a7)
Expand Down

0 comments on commit 3852dd0

Please sign in to comment.