diff --git a/entry/boot.c b/entry/boot.c index 7574ac1..31d71d8 100644 --- a/entry/boot.c +++ b/entry/boot.c @@ -6,9 +6,9 @@ void __eabi(void) { } -int test(const char* name) +int ofw_test(const char* name) { - struct + struct { char* service; int n_args; @@ -17,7 +17,7 @@ int test(const char* name) int ret; } ofw_arg; - const char _service[5] = "test"; + char _service[5] = "test"; ofw_arg.service = _service; ofw_arg.n_args = 1; @@ -32,7 +32,7 @@ int test(const char* name) void main(void) { asm volatile("stw 5, %0" : "=m"(ofw)); - if (test("open")) + if (ofw_test("open")) { asm("mr 27, 28"); asm("b $"); diff --git a/entry/boot.h b/entry/boot.h index 90bb3ec..d5345a5 100644 --- a/entry/boot.h +++ b/entry/boot.h @@ -1,2 +1,5 @@ void (*ofw)(); void __eabi(); + +typedef int phandle; +typedef int ihandle;