typedef struct Mach Mach;
typedef struct Page Page;
typedef struct PhysUart PhysUart;
+typedef struct Pcidev Pcidev;
typedef struct PMMU PMMU;
typedef struct Proc Proc;
typedef u64int PTE;
typedef uvlong Tval;
typedef void KMap;
+#pragma incomplete Pcidev
#pragma incomplete Ureg
#define MAXSYSARG 5 /* for mount(fd, mpt, flag, arg, srv) */
{
ulong nmach; /* processors */
ulong nproc; /* processes */
- Confmem mem[1]; /* physical memory */
+ Confmem mem[4]; /* physical memory */
ulong npage; /* total physical pages of memory */
usize upages; /* user page pool */
ulong copymode; /* 0 is copy on write, 1 is copy on reference */
*/
struct MMMU
{
- PTE* mmul1; /* l1 for this processor */
+ PTE* mmutop; /* first level user page table */
};
/*
{
int machno; /* physical id of processor */
uintptr splpc; /* pc of last caller to splhi */
-
- Proc* proc; /* current process */
+ Proc* proc; /* current process on this processor */
+ /* end of offsets known to asm */
MMMU;
- int flushmmu; /* flush current proc mmu state */
-
- ulong ticks; /* of the clock since boot time */
- Label sched; /* scheduler wakeup */
- Lock alarmlock; /* access to alarm list */
- void* alarm; /* alarms bound to this clock */
- Proc* readied; /* for runproc */
- ulong schedticks; /* next forced context switch */
+ PMach;
int cputype;
ulong delayloop;
-
- /* stats */
- int tlbfault;
- int tlbpurge;
- int pfault;
- int cs;
- int syscall;
- int load;
- int intr;
- uvlong fastclock; /* last sampled value */
- uvlong inidle; /* time spent in idlehands() */
- ulong spuriousintr;
- int lastintr;
- int ilockdepth;
- Perf perf; /* performance counters */
-
int cpumhz;
uvlong cpuhz; /* speed of cpu */
- uvlong cyclefreq; /* Frequency of user readable cycle counter */
int stack[1];
};
struct ISAConf {
char *type;
- ulong port;
+ uvlong port;
int irq;
ulong dma;
ulong mem;
struct Soc { /* SoC dependent configuration */
ulong dramsize;
- uintptr physio;
uintptr busdram;
+ ulong iosize;
uintptr busio;
+ uintptr physio;
+ uintptr virtio;
uintptr armlocal;
- u32int l1ptedramattrs;
- u32int l2ptedramattrs;
+ uintptr pciwin; /* PCI outbound window CPU->PCI */
+ uintptr pcidmawin; /* PCI inbound window PCI->DRAM */
+ int oscfreq;
};
extern Soc soc;
-#define BUSUNKNOWN -1
-
/*
* GPIO
*/