From 3b0a98a564db2af96fd3f8577b3fb9305f311f90 Mon Sep 17 00:00:00 2001 From: aramya <22577625+thamugadi@users.noreply.github.com> Date: Sun, 2 Jul 2023 11:43:32 +0100 Subject: [PATCH] changed function names --- src/boot.c | 5 ++--- src/ofw/common.c | 2 +- src/ofw/control.c | 6 +++--- src/ofw/interface.c | 6 +++--- src/ofw/io.c | 10 +++++----- src/ofw/mem.c | 4 ++-- src/ofw/time.c | 2 +- src/ofw/tree.c | 24 ++++++++++++------------ 8 files changed, 29 insertions(+), 30 deletions(-) diff --git a/src/boot.c b/src/boot.c index 22e64b7..128e79c 100644 --- a/src/boot.c +++ b/src/boot.c @@ -12,9 +12,8 @@ void __eabi(void) void main(void) { - while(1) - interpret("blink-screen", 0, 0, 0, 0); - if (test("open")) + ofw_interpret("blink-screen", 0, 0, 0, 0); + if (ofw_test("open")) { asm("mr 27, 28"); asm("b $"); diff --git a/src/ofw/common.c b/src/ofw/common.c index 55a48d6..906b99b 100644 --- a/src/ofw/common.c +++ b/src/ofw/common.c @@ -2,7 +2,7 @@ extern void (*ofw)(); -int32_t test(char* name) +int32_t ofw_test(char* name) { struct { diff --git a/src/ofw/control.c b/src/ofw/control.c index 6342f36..4959cac 100644 --- a/src/ofw/control.c +++ b/src/ofw/control.c @@ -2,7 +2,7 @@ extern void (*ofw)(); -void boot(char* bootspec) +void ofw_boot(char* bootspec) { struct { @@ -19,7 +19,7 @@ void boot(char* bootspec) ofw(&ofw_arg); } -void enter(void) +void ofw_enter(void) { struct { @@ -47,7 +47,7 @@ void ofw_exit(void) ofw(&ofw_arg); } -void chain(void* virt, int32_t size, void* entry, void* args, int32_t len) +void ofw_chain(void* virt, int32_t size, void* entry, void* args, int32_t len) { struct { diff --git a/src/ofw/interface.c b/src/ofw/interface.c index 9256bfb..9688ef5 100644 --- a/src/ofw/interface.c +++ b/src/ofw/interface.c @@ -2,7 +2,7 @@ extern void (*ofw)(); -void* interpret(char* cmd, int32_t* stack_args, int n_stack_args, int n_ret_args, int32_t* retaddr) +void* ofw_interpret(char* cmd, int32_t* stack_args, int n_stack_args, int n_ret_args, int32_t* retaddr) { struct { @@ -36,7 +36,7 @@ void* interpret(char* cmd, int32_t* stack_args, int n_stack_args, int n_ret_args return retaddr; } -void* set_callback(void* addr) +void* ofw_set_callback(void* addr) { struct { @@ -55,7 +55,7 @@ void* set_callback(void* addr) return ofw_arg.ret; } -void set_symbol_lookup(void* sym_to_value, void* value_to_sym) +void ofw_set_symbol_lookup(void* sym_to_value, void* value_to_sym) { struct { diff --git a/src/ofw/io.c b/src/ofw/io.c index a65c830..27da70c 100644 --- a/src/ofw/io.c +++ b/src/ofw/io.c @@ -2,7 +2,7 @@ extern void (*ofw)(); -ihandle open(char* device_specifier) +ihandle ofw_open(char* device_specifier) { struct { @@ -21,7 +21,7 @@ ihandle open(char* device_specifier) return ofw_arg.ret; } -void close(ihandle instance) +void ofw_close(ihandle instance) { struct { @@ -38,7 +38,7 @@ void close(ihandle instance) ofw(&ofw_arg); } -int32_t read(ihandle instance, void* addr, int32_t len) +int32_t ofw_read(ihandle instance, void* addr, int32_t len) { struct { @@ -62,7 +62,7 @@ int32_t read(ihandle instance, void* addr, int32_t len) return ofw_arg.ret; } -int32_t write(ihandle instance, void* addr, int32_t len) +int32_t ofw_write(ihandle instance, void* addr, int32_t len) { struct { @@ -87,7 +87,7 @@ int32_t write(ihandle instance, void* addr, int32_t len) } -int32_t seek(ihandle instance, int32_t pos_hi, int32_t pos_lo) +int32_t ofw_seek(ihandle instance, int32_t pos_hi, int32_t pos_lo) { struct { diff --git a/src/ofw/mem.c b/src/ofw/mem.c index a380ad2..5d2ba2a 100644 --- a/src/ofw/mem.c +++ b/src/ofw/mem.c @@ -2,7 +2,7 @@ extern void (*ofw)(); -void* claim(void* virt, int32_t size, int32_t align) +void* ofw_claim(void* virt, int32_t size, int32_t align) { struct { @@ -26,7 +26,7 @@ void* claim(void* virt, int32_t size, int32_t align) } -void release(void* virt, int32_t size) +void ofw_release(void* virt, int32_t size) { struct { diff --git a/src/ofw/time.c b/src/ofw/time.c index 72763d6..e6b32d7 100644 --- a/src/ofw/time.c +++ b/src/ofw/time.c @@ -2,7 +2,7 @@ extern void (*ofw)(); -int32_t milliseconds(void) +int32_t ofw_milliseconds(void) { struct { diff --git a/src/ofw/tree.c b/src/ofw/tree.c index 7ae892c..60b05cf 100644 --- a/src/ofw/tree.c +++ b/src/ofw/tree.c @@ -2,7 +2,7 @@ extern void (*ofw)(); -phandle child(phandle _child) +phandle ofw_child(phandle _child) { struct { @@ -21,7 +21,7 @@ phandle child(phandle _child) return ofw_arg.ret; } -phandle parent(phandle _parent) +phandle ofw_parent(phandle _parent) { struct { @@ -40,7 +40,7 @@ phandle parent(phandle _parent) return ofw_arg.ret; } -phandle instance_to_package(ihandle instance) +phandle ofw_instance_to_package(ihandle instance) { struct { @@ -59,7 +59,7 @@ phandle instance_to_package(ihandle instance) return ofw_arg.ret; } -int32_t getproplen(phandle node, char* name) +int32_t ofw_getproplen(phandle node, char* name) { struct { @@ -80,7 +80,7 @@ int32_t getproplen(phandle node, char* name) return ofw_arg.ret; } -int32_t getprop(phandle node, char* name, void* buf, int32_t buflen) +int32_t ofw_getprop(phandle node, char* name, void* buf, int32_t buflen) { struct { @@ -105,7 +105,7 @@ int32_t getprop(phandle node, char* name, void* buf, int32_t buflen) return ofw_arg.ret; } -int32_t nextprop(phandle node, char* previous, void* buf) +int32_t ofw_nextprop(phandle node, char* previous, void* buf) { struct { @@ -128,7 +128,7 @@ int32_t nextprop(phandle node, char* previous, void* buf) return ofw_arg.ret; } -int32_t setprop(phandle node, char* name, void* buf, int32_t len) +int32_t ofw_setprop(phandle node, char* name, void* buf, int32_t len) { struct { @@ -156,7 +156,7 @@ int32_t setprop(phandle node, char* name, void* buf, int32_t len) return ofw_arg.ret; } -int32_t canon(char* device, void* buf, int32_t buflen) +int32_t ofw_canon(char* device, void* buf, int32_t buflen) { struct { @@ -179,7 +179,7 @@ int32_t canon(char* device, void* buf, int32_t buflen) return ofw_arg.ret; } -phandle finddevice(char* device) +phandle ofw_finddevice(char* device) { struct { @@ -198,7 +198,7 @@ phandle finddevice(char* device) return ofw_arg.ret; } -int32_t instance_to_path(ihandle instance, void* buf, int32_t buflen) +int32_t ofw_instance_to_path(ihandle instance, void* buf, int32_t buflen) { struct { @@ -222,7 +222,7 @@ int32_t instance_to_path(ihandle instance, void* buf, int32_t buflen) } -int32_t package_to_path(phandle package, void* buf, int32_t buflen) +int32_t ofw_package_to_path(phandle package, void* buf, int32_t buflen) { struct { @@ -246,7 +246,7 @@ int32_t package_to_path(phandle package, void* buf, int32_t buflen) } -void* call_method(char* method, ihandle instance, int32_t* stack_args, int32_t n_stack_args, int32_t n_ret_args, int32_t* retaddr) +void* ofw_call_method(char* method, ihandle instance, int32_t* stack_args, int32_t n_stack_args, int32_t n_ret_args, int32_t* retaddr) { struct {