-
-#ifdef RPI1
-#define IOBASEADDR 0x20000000
-#else
-#define IOBASEADDR 0x3f000000
-#endif
-
-#define phys2bus(addr) ((addr) | 0x40000000)
-#define bus2phys(addr) ((addr) & 0x3fffffff)
-
-#define IOREG_ADDR(x) (IOBASEADDR | (x))
-#define REG_MB_READ *((volatile uint32_t*)IOREG_ADDR(0xb880))
-#define REG_MB_STAT *((volatile uint32_t*)IOREG_ADDR(0xb898))
-#define REG_MB_WRITE *((volatile uint32_t*)IOREG_ADDR(0xb8a0))
-
-#define MB_STAT_FULL 0x80000000
-#define MB_STAT_EMPTY 0x40000000
-
-#define MB_CHAN_FRAMEBUF 1
-#define MB_CHAN_PROP 8
-
-#define PROP_CODE_REQ 0
-#define PROP_RESP_OK 0x80000000
-
-
-#define PROP_TAG_END 0
-
-#define PROP_TAG_SET 0x08000
-#define PROP_TAG_TEST 0x04000
-#define PROP_TAG_GET 0
-
-#define PROP_TAG_ALLOCBUF 0x40001
-#define PROP_TAG_BLANKSCR 0x40002
-#define PROP_TAG_PHYSRES 0x40003
-#define PROP_TAG_VIRTRES 0x40004
-#define PROP_TAG_DEPTH 0x40005
-#define PROP_TAG_PIXEL_ORDER 0x40006
-#define PROP_TAG_ALPHA_MODE 0x40007
-#define PROP_TAG_PITCH 0x40008
-#define PROP_TAG_VOFFS 0x40009
-#define PROP_TAG_OVERSCAN 0x4000a
-#define PROP_TAG_PALETTE 0x4000b
-#define PROP_TAG_CUR_INFO 0x00010
-#define PROP_TAG_CUR_STATE 0x00011
-
-
-void panic(void);
-int prop_blankscr(int onoff);
-int prop_setres(int xsz, int ysz);
-int prop_getres(int *xsz, int *ysz);
-int prop_setvres(int xsz, int ysz);
-int prop_getvres(int *xsz, int *ysz);
-int prop_setdepth(int bpp);
-int prop_getdepth(void);
-int prop_getpitch(void);
-void *prop_allocbuf(int *size);
-
-uint32_t mb_read(int chan);
-void mb_write(int chan, uint32_t val);