typedef struct Conf Conf;
typedef struct Confmem Confmem;
typedef struct FPsave FPsave;
+typedef struct PFPU PFPU;
typedef struct ISAConf ISAConf;
typedef struct Label Label;
typedef struct Lock Lock;
typedef struct Memcache Memcache;
typedef struct MMMU MMMU;
typedef struct Mach Mach;
-typedef struct Notsave Notsave;
typedef struct Page Page;
typedef struct PhysUart PhysUart;
typedef struct PMMU PMMU;
typedef struct Proc Proc;
typedef u32int PTE;
+typedef struct Soc Soc;
typedef struct Uart Uart;
typedef struct Ureg Ureg;
typedef uvlong Tval;
uintptr pc;
};
+/*
+ * emulated or vfp3 floating point
+ */
enum {
Maxfpregs = 32, /* could be 16 or 32, see Mach.fpnregs */
Nfpctlregs = 16,
};
-/*
- * emulated or vfp3 floating point
- */
struct FPsave
{
ulong status;
uintptr pc; /* of failed fp instr. */
};
-/*
- * FPsave.fpstate
- */
+struct PFPU
+{
+ int fpstate;
+ FPsave fpsave[1];
+};
+
enum
{
FPinit,
int monitor; /* flag */
};
-/*
- * things saved in the Proc structure during a notify
- */
-struct Notsave {
- int emptiness;
-};
-
/*
* MMU stuff in Mach.
*/
typedef void KMap;
#define VA(k) ((uintptr)(k))
#define kmap(p) (KMap*)((p)->pa|kseg0)
-#define kunmap(k)
+extern void kunmap(KMap*);
struct
{
extern register Proc* up; /* R9 */
extern uintptr kseg0;
extern Mach* machaddr[MAXMACH];
-extern ulong memsize;
extern int normalprint;
/*
Devport *ports; /* The ports themselves */
};
+struct Soc { /* SoC dependent configuration */
+ ulong dramsize;
+ ulong iosize;
+ uintptr busdram;
+ uintptr busio;
+ uintptr physio;
+ uintptr virtio;
+ uintptr armlocal;
+ u32int l1ptedramattrs;
+ u32int l2ptedramattrs;
+};
+extern Soc soc;
+
+/*
+ * GPIO
+ */
+enum {
+ Input = 0x0,
+ Output = 0x1,
+ Alt0 = 0x4,
+ Alt1 = 0x5,
+ Alt2 = 0x6,
+ Alt3 = 0x7,
+ Alt4 = 0x3,
+ Alt5 = 0x2,
+};