This commit is contained in:
aramya 2023-07-01 04:34:00 +01:00
parent aa79432946
commit 74790b7525
2 changed files with 7 additions and 4 deletions

View File

@ -6,9 +6,9 @@ void __eabi(void)
{ {
} }
int test(const char* name) int ofw_test(const char* name)
{ {
struct struct
{ {
char* service; char* service;
int n_args; int n_args;
@ -17,7 +17,7 @@ int test(const char* name)
int ret; int ret;
} ofw_arg; } ofw_arg;
const char _service[5] = "test"; char _service[5] = "test";
ofw_arg.service = _service; ofw_arg.service = _service;
ofw_arg.n_args = 1; ofw_arg.n_args = 1;
@ -32,7 +32,7 @@ int test(const char* name)
void main(void) void main(void)
{ {
asm volatile("stw 5, %0" : "=m"(ofw)); asm volatile("stw 5, %0" : "=m"(ofw));
if (test("open")) if (ofw_test("open"))
{ {
asm("mr 27, 28"); asm("mr 27, 28");
asm("b $"); asm("b $");

View File

@ -1,2 +1,5 @@
void (*ofw)(); void (*ofw)();
void __eabi(); void __eabi();
typedef int phandle;
typedef int ihandle;