mirror of
https://github.com/thamugadi/powerpc-ofw-boot.git
synced 2024-06-19 17:29:26 +00:00
Compare commits
2 Commits
75395c1aea
...
b33635641b
Author | SHA1 | Date | |
---|---|---|---|
|
b33635641b | ||
|
3b0a98a564 |
|
@ -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 $");
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
extern void (*ofw)();
|
||||
|
||||
int32_t test(char* name)
|
||||
int32_t ofw_test(char* name)
|
||||
{
|
||||
struct
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
10
src/ofw/io.c
10
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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
extern void (*ofw)();
|
||||
|
||||
int32_t milliseconds(void)
|
||||
int32_t ofw_milliseconds(void)
|
||||
{
|
||||
struct
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
@ -142,11 +142,8 @@ int32_t setprop(phandle node, char* name, void* buf, int32_t len)
|
|||
int32_t ret;
|
||||
} ofw_arg;
|
||||
|
||||
char _service[8] = "setprop";
|
||||
ofw_arg.service = _service;
|
||||
SERVICE("setprop", 8, 4, 1);
|
||||
|
||||
ofw_arg.n_args = 4;
|
||||
ofw_arg.n_rets = 1;
|
||||
ofw_arg.arg1 = node;
|
||||
ofw_arg.arg2 = name;
|
||||
ofw_arg.arg3 = buf;
|
||||
|
@ -156,7 +153,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 +176,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 +195,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 +219,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 +243,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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user