#ifndef _MACHINE_AUTOCONF_H_
#define _MACHINE_AUTOCONF_H_
#include <machine/bus.h>
struct bonito_config;
struct htb_config;
struct mips_isa_chipset;
struct legacy_io_range {
bus_addr_t start;
bus_size_t end;
};
struct platform {
int system_type;
#define LOONGSON_2E 0x0000
#define LOONGSON_YEELOONG 0x0001
#define LOONGSON_GDIUM 0x0002
#define LOONGSON_FULOONG 0x0003
#define LOONGSON_LYNLOONG 0x0004
#define LOONGSON_EBT700 0x0005
#define LOONGSON_3A 0x0066
char *vendor;
char *product;
const struct bonito_config *bonito_config;
const struct htb_config *htb_config;
struct mips_isa_chipset *isa_chipset;
const struct legacy_io_range *legacy_io_ranges;
void (*setup)(void);
void (*device_register)(struct device *,
void *);
void (*powerdown)(void);
void (*reset)(void);
int (*suspend)(void);
int (*resume)(void);
#ifdef MULTIPROCESSOR
void (*config_secondary_cpus)(
struct device *, cfprint_t);
void (*boot_secondary_cpu)(
struct cpu_info *);
int (*ipi_establish)(int (*)(void *),
cpuid_t);
void (*ipi_set)(cpuid_t);
void (*ipi_clear)(cpuid_t);
#endif
};
#define LOONGSON_MAXCPUS 16
extern const struct platform *sys_platform;
extern void *loongson_videobios;
extern uint loongson_cpumask;
extern uint loongson_ver;
extern int nnodes;
#ifdef MULTIPROCESSOR
extern uint64_t cpu_spinup_a0;
extern uint64_t cpu_spinup_sp;
#endif
struct mainbus_attach_args {
const char *maa_name;
};
extern struct device *bootdv;
extern char bootdev[];
extern enum devclass bootdev_class;
extern bus_space_tag_t early_mem_t;
extern bus_space_tag_t early_io_t;
#define REGVAL8(x) *((volatile uint8_t *)PHYS_TO_XKPHYS((x), CCA_NC))
#define REGVAL32(x) *((volatile uint32_t *)PHYS_TO_XKPHYS((x), CCA_NC))
#define REGVAL64(x) *((volatile uint64_t *)PHYS_TO_XKPHYS((x), CCA_NC))
#define REGVAL(x) REGVAL32(x)
#include <mips64/autoconf.h>
#endif