From 74790b752527ab8848ef6cfe89aea102c2cd99f5 Mon Sep 17 00:00:00 2001 From: aramya <22577625+thamugadi@users.noreply.github.com> Date: Sat, 1 Jul 2023 04:34:00 +0100 Subject: [PATCH] ofw_test --- entry/boot.c | 8 ++++---- entry/boot.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) 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;