Rev 964 | Rev 1075 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 964 | Rev 1058 | ||
|---|---|---|---|
| Line 25... | Line 25... | ||
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
27 | */ |
| 28 | 28 | ||
| 29 | #include "ofw.h" |
29 | #include "ofw.h" |
| - | 30 | #include "asm.h" |
|
| 30 | #include "printf.h" |
31 | #include "printf.h" |
| 31 | 32 | ||
| 32 | #define MAX_OFW_ARGS 10 |
33 | #define MAX_OFW_ARGS 10 |
| 33 | 34 | ||
| 34 | typedef unsigned int ofw_arg_t; |
35 | typedef unsigned int ofw_arg_t; |
| Line 111... | Line 112... | ||
| 111 | halt(); |
112 | halt(); |
| 112 | } |
113 | } |
| 113 | } |
114 | } |
| 114 | 115 | ||
| 115 | 116 | ||
| 116 | void halt(void) |
- | |
| 117 | { |
- | |
| 118 | ofw_call("exit", 0, 0); |
- | |
| 119 | } |
- | |
| 120 | - | ||
| 121 | - | ||
| 122 | void ofw_write(const char *str, const int len) |
117 | void ofw_write(const char *str, const int len) |
| 123 | { |
118 | { |
| 124 | if (ofw_stdout == 0) |
119 | if (ofw_stdout == 0) |
| 125 | return; |
120 | return; |
| 126 | 121 | ||
| Line 132... | Line 127... | ||
| 132 | { |
127 | { |
| 133 | return (void *) ofw_call("call-method", 7, 1, "translate", ofw_mmu, virt, 0, 0, 0, 0); |
128 | return (void *) ofw_call("call-method", 7, 1, "translate", ofw_mmu, virt, 0, 0, 0, 0); |
| 134 | } |
129 | } |
| 135 | 130 | ||
| 136 | 131 | ||
| 137 | int ofw_map(const void *phys, const void *virt, const int size, const int mode) |
- | |
| 138 | { |
- | |
| 139 | return ofw_call("call-method", 6, 1, "map", ofw_mmu, mode, size, virt, phys); |
- | |
| 140 | } |
- | |
| 141 | - | ||
| 142 | - | ||
| 143 | int ofw_memmap(memmap_t *map) |
132 | int ofw_memmap(memmap_t *map) |
| 144 | { |
133 | { |
| 145 | int i; |
134 | int i; |
| 146 | int ret; |
135 | int ret; |
| 147 | 136 | ||