#ifndef _MACHINE_BOARD_H_
#define _MACHINE_BOARD_H_
#if defined(_LOCORE)
#define U(num) num
#elif defined(__STDC__)
#define U(num) num ## U
#else
#define U(num) numU
#endif
#define LUNA_88K 0x1
#define LUNA_88K2 0x2
#define MAXPHYSMEM U(0x10000000)
#define PROM_ADDR U(0x41000000)
#define PROM_SPACE U(0x00040000)
#define NVRAM_ADDR U(0x45000000)
#define NVRAM_SPACE U(0x00001FDC)
#define FUSE_ROM_ADDR U(0x43000000)
#define FUSE_ROM_SPACE 1024
#define OBIO_CAL_CTL U(0x45001FE0)
#define OBIO_CAL_SEC U(0x45001FE4)
#define OBIO_CAL_MIN U(0x45001FE8)
#define OBIO_CAL_HOUR U(0x45001FEC)
#define OBIO_CAL_DOW U(0x45001FF0)
#define OBIO_CAL_DAY U(0x45001FF4)
#define OBIO_CAL_MON U(0x45001FF8)
#define OBIO_CAL_YEAR U(0x45001FFC)
#define NVRAM_ADDR_88K2 U(0x47000000)
#define OBIO_PIO0_BASE U(0x49000000)
#define OBIO_PIO0_SPACE U(0x0000000C)
#define OBIO_PIO0A U(0x49000000)
#define OBIO_PIO0B U(0x49000004)
#define OBIO_PIO0C U(0x49000008)
#define OBIO_PIO0 U(0x4900000C)
#define OBIO_PIO1_BASE U(0x4D000000)
#define OBIO_PIO1_SPACE U(0x0000000C)
#define OBIO_PIO1A U(0x4D000000)
#define OBIO_PIO1B U(0x4D000004)
#define OBIO_PIO1C U(0x4D000008)
#define OBIO_PIO1 U(0x4D00000C)
#define OBIO_SIO U(0x51000000)
#define OBIO_TAS U(0x61000000)
#define OBIO_CLOCK0 U(0x63000000)
#define OBIO_CLOCK1 U(0x63000004)
#define OBIO_CLOCK2 U(0x63000008)
#define OBIO_CLOCK3 U(0x6300000C)
#define OBIO_CLK_INTR 31
#define INT_ST_MASK0 U(0x65000000)
#define INT_ST_MASK1 U(0x65000004)
#define INT_ST_MASK2 U(0x65000008)
#define INT_ST_MASK3 U(0x6500000C)
#define INT_LEVEL 8
#define INT_SET_LV7 U(0x00000000)
#define INT_SET_LV6 U(0x00000000)
#define INT_SET_LV5 U(0x84000000)
#define INT_SET_LV4 U(0xC4000000)
#define INT_SET_LV3 U(0xE4000000)
#define INT_SET_LV2 U(0xF4000000)
#define INT_SET_LV1 U(0xFC000000)
#define INT_SET_LV0 U(0xFC000000)
#define INT_SLAVE_MASK U(0x84000000)
#define SOFT_INT0 U(0x69000000)
#define SOFT_INT1 U(0x69000004)
#define SOFT_INT2 U(0x69000008)
#define SOFT_INT3 U(0x6900000C)
#define SOFT_INT_FLAG0 U(0x6B000000)
#define SOFT_INT_FLAG1 U(0x6B000000)
#define SOFT_INT_FLAG2 U(0x6B000000)
#define SOFT_INT_FLAG3 U(0x6B000000)
#define RESET_CPU0 U(0x6D000000)
#define RESET_CPU1 U(0x6D000004)
#define RESET_CPU2 U(0x6D000008)
#define RESET_CPU3 U(0x6D00000C)
#define RESET_CPU_ALL U(0x6D000010)
#define TRI_PORT_RAM U(0x71000000)
#define TRI_PORT_RAM_SPACE 0x20000
#define EXT_A_ADDR U(0x81000000)
#define EXT_A_SPACE U(0x02000000)
#define EXT_B_ADDR U(0x83000000)
#define EXT_B_SPACE U(0x01000000)
#define PC_BASE U(0x90000000)
#define PC_SPACE U(0x02000000)
#define MROM_ADDR U(0xA1000000)
#define MROM_SPACE 0x400000
#define BMAP_START U(0xB1000000)
#define BMAP_SPACE (BMAP_END - BMAP_START)
#define BMAP_RFCNT U(0xB1000000)
#define BMAP_BMSEL U(0xB1040000)
#define BMAP_BMP U(0xB1080000)
#define BMAP_BMAP0 U(0xB10C0000)
#define BMAP_BMAP1 U(0xB1100000)
#define BMAP_BMAP2 U(0xB1140000)
#define BMAP_BMAP3 U(0xB1180000)
#define BMAP_BMAP4 U(0xB11C0000)
#define BMAP_BMAP5 U(0xB1200000)
#define BMAP_BMAP6 U(0xB1240000)
#define BMAP_BMAP7 U(0xB1280000)
#define BMAP_FN U(0xB12C0000)
#define BMAP_FN0 U(0xB1300000)
#define BMAP_FN1 U(0xB1340000)
#define BMAP_FN2 U(0xB1380000)
#define BMAP_FN3 U(0xB13C0000)
#define BMAP_FN4 U(0xB1400000)
#define BMAP_FN5 U(0xB1440000)
#define BMAP_FN6 U(0xB1480000)
#define BMAP_FN7 U(0xB14C0000)
#define BMAP_END U(0xB1500000)
#define BMAP_END24P U(0xB1800000)
#define BMAP_PALLET0 U(0xC0000000)
#define BMAP_PALLET1 U(0xC1000000)
#define BMAP_PALLET2 U(0xC1100000)
#define BOARD_CHECK_REG U(0xD0000000)
#define BMAP_CRTC U(0xD1000000)
#define BMAP_IDENTROM U(0xD1800000)
#define SCSI_ADDR U(0xE1000000)
#define LANCE_ADDR U(0xF1000000)
#define CMMU_I0 U(0xFFF07000)
#define CMMU_D0 U(0xFFF06000)
#define CMMU_I1 U(0xFFF05000)
#define CMMU_D1 U(0xFFF04000)
#define CMMU_I2 U(0xFFF03000)
#define CMMU_D2 U(0xFFF02000)
#define CMMU_I3 U(0xFFF01000)
#define CMMU_D3 U(0xFFF00000)
#endif