1/*
2** Copyright 2001, Travis Geiselbrecht. All rights reserved.
3** Distributed under the terms of the NewOS License.
4*/
5#ifndef _STAGE2_PRIV_H
6#define _STAGE2_PRIV_H
7
8#define LOAD_ADDR 0x100000
9#define BOOTDIR_ADDR 0x101000
10
11int s2_text_init();
12void s2_change_framebuffer_addr(unsigned int address);
13void putchar(char c);
14void puts(char *str);
15int printf(const char *fmt, ...);
16
17int of_init(void *of_entry);
18int of_open(const char *node_name);
19int of_finddevice(const char *dev);
20int of_instance_to_package(int in_handle);
21int of_getprop(int handle, const char *prop, void *buf, int buf_len);
22int of_setprop(int handle, const char *prop, const void *buf, int buf_len);
23int of_read(int handle, void *buf, int buf_len);
24int of_write(int handle, void *buf, int buf_len);
25int of_seek(int handle, long long pos);
26
27int s2_mmu_init();
28void mmu_map_page(unsigned int vsid, unsigned long pa, unsigned long va);;
29void syncicache(void *address, int len);
30
31void s2_faults_init(kernel_args *ka);
32
33void getibats(int bats[8]);
34void setibats(int bats[8]);
35void getdbats(int bats[8]);
36void setdbats(int bats[8]);
37unsigned int *getsdr1();
38void setsdr1(unsigned int sdr);
39unsigned int getsr(int sr);
40unsigned int getmsr();
41void setmsr(unsigned int msr);
42
43#endif
44