Linux Audio

Check our new training course

Loading...
v4.10.11
 
  1#ifndef __ALPHA_HWRPB_H
  2#define __ALPHA_HWRPB_H
  3
  4#define INIT_HWRPB ((struct hwrpb_struct *) 0x10000000)
  5
  6/*
  7 * DEC processor types for Alpha systems.  Found in HWRPB.
  8 * These values are architected.
  9 */
 10
 11#define EV3_CPU                 1       /* EV3                  */
 12#define EV4_CPU                 2       /* EV4 (21064)          */
 13#define LCA4_CPU                4       /* LCA4 (21066/21068)   */
 14#define EV5_CPU                 5       /* EV5 (21164)          */
 15#define EV45_CPU                6       /* EV4.5 (21064/xxx)    */
 16#define EV56_CPU		7	/* EV5.6 (21164)	*/
 17#define EV6_CPU			8	/* EV6 (21264)		*/
 18#define PCA56_CPU		9	/* PCA56 (21164PC)	*/
 19#define PCA57_CPU		10	/* PCA57 (notyet)	*/
 20#define EV67_CPU		11	/* EV67 (21264A)	*/
 21#define EV68CB_CPU		12	/* EV68CB (21264C)	*/
 22#define EV68AL_CPU		13	/* EV68AL (21264B)	*/
 23#define EV68CX_CPU		14	/* EV68CX (21264D)	*/
 24#define EV7_CPU			15	/* EV7 (21364)		*/
 25#define EV79_CPU		16	/* EV79 (21364??)	*/
 26#define EV69_CPU		17	/* EV69 (21264/EV69A)	*/
 27
 28/*
 29 * DEC system types for Alpha systems.  Found in HWRPB.
 30 * These values are architected.
 31 */
 32
 33#define ST_ADU			  1	/* Alpha ADU systype	*/
 34#define ST_DEC_4000		  2	/* Cobra systype	*/
 35#define ST_DEC_7000		  3	/* Ruby systype		*/
 36#define ST_DEC_3000_500		  4	/* Flamingo systype	*/
 37#define ST_DEC_2000_300		  6	/* Jensen systype	*/
 38#define ST_DEC_3000_300		  7	/* Pelican systype	*/
 39#define ST_DEC_2100_A500	  9	/* Sable systype	*/
 40#define ST_DEC_AXPVME_64	 10	/* AXPvme system type	*/
 41#define ST_DEC_AXPPCI_33	 11	/* NoName system type	*/
 42#define ST_DEC_TLASER		 12	/* Turbolaser systype	*/
 43#define ST_DEC_2100_A50		 13	/* Avanti systype	*/
 44#define ST_DEC_MUSTANG		 14	/* Mustang systype	*/
 45#define ST_DEC_ALCOR		 15	/* Alcor (EV5) systype	*/
 46#define ST_DEC_1000		 17	/* Mikasa systype	*/
 47#define ST_DEC_EB64		 18	/* EB64 systype		*/
 48#define ST_DEC_EB66		 19	/* EB66 systype		*/
 49#define ST_DEC_EB64P		 20	/* EB64+ systype	*/
 50#define ST_DEC_BURNS		 21	/* laptop systype	*/
 51#define ST_DEC_RAWHIDE		 22	/* Rawhide systype	*/
 52#define ST_DEC_K2		 23	/* K2 systype		*/
 53#define ST_DEC_LYNX		 24	/* Lynx systype		*/
 54#define ST_DEC_XL		 25	/* Alpha XL systype	*/
 55#define ST_DEC_EB164		 26	/* EB164 systype	*/
 56#define ST_DEC_NORITAKE		 27	/* Noritake systype	*/
 57#define ST_DEC_CORTEX		 28	/* Cortex systype	*/
 58#define ST_DEC_MIATA		 30	/* Miata systype        */
 59#define ST_DEC_XXM		 31	/* XXM systype		*/
 60#define ST_DEC_TAKARA		 32	/* Takara systype	*/
 61#define ST_DEC_YUKON		 33	/* Yukon systype	*/
 62#define ST_DEC_TSUNAMI		 34	/* Tsunami systype	*/
 63#define ST_DEC_WILDFIRE		 35	/* Wildfire systype	*/
 64#define ST_DEC_CUSCO		 36	/* CUSCO systype	*/
 65#define ST_DEC_EIGER		 37	/* Eiger systype	*/
 66#define ST_DEC_TITAN		 38	/* Titan systype	*/
 67#define ST_DEC_MARVEL		 39	/* Marvel systype	*/
 68
 69/* UNOFFICIAL!!! */
 70#define ST_UNOFFICIAL_BIAS	100
 71#define ST_DTI_RUFFIAN		101	/* RUFFIAN systype	*/
 72
 73/* Alpha Processor, Inc. systems */
 74#define ST_API_BIAS		200
 75#define ST_API_NAUTILUS		201	/* UP1000 systype	*/
 76
 77struct pcb_struct {
 78	unsigned long ksp;
 79	unsigned long usp;
 80	unsigned long ptbr;
 81	unsigned int pcc;
 82	unsigned int asn;
 83	unsigned long unique;
 84	unsigned long flags;
 85	unsigned long res1, res2;
 86};
 87
 88struct percpu_struct {
 89	unsigned long hwpcb[16];
 90	unsigned long flags;
 91	unsigned long pal_mem_size;
 92	unsigned long pal_scratch_size;
 93	unsigned long pal_mem_pa;
 94	unsigned long pal_scratch_pa;
 95	unsigned long pal_revision;
 96	unsigned long type;
 97	unsigned long variation;
 98	unsigned long revision;
 99	unsigned long serial_no[2];
100	unsigned long logout_area_pa;
101	unsigned long logout_area_len;
102	unsigned long halt_PCBB;
103	unsigned long halt_PC;
104	unsigned long halt_PS;
105	unsigned long halt_arg;
106	unsigned long halt_ra;
107	unsigned long halt_pv;
108	unsigned long halt_reason;
109	unsigned long res;
110	unsigned long ipc_buffer[21];
111	unsigned long palcode_avail[16];
112	unsigned long compatibility;
113	unsigned long console_data_log_pa;
114	unsigned long console_data_log_length;
115	unsigned long bcache_info;
116};
117
118struct procdesc_struct {
119	unsigned long weird_vms_stuff;
120	unsigned long address;
121};
122
123struct vf_map_struct {
124	unsigned long va;
125	unsigned long pa;
126	unsigned long count;
127};
128
129struct crb_struct {
130	struct procdesc_struct * dispatch_va;
131	struct procdesc_struct * dispatch_pa;
132	struct procdesc_struct * fixup_va;
133	struct procdesc_struct * fixup_pa;
134	/* virtual->physical map */
135	unsigned long map_entries;
136	unsigned long map_pages;
137	struct vf_map_struct map[1];
138};
139
140struct memclust_struct {
141	unsigned long start_pfn;
142	unsigned long numpages;
143	unsigned long numtested;
144	unsigned long bitmap_va;
145	unsigned long bitmap_pa;
146	unsigned long bitmap_chksum;
147	unsigned long usage;
148};
149
150struct memdesc_struct {
151	unsigned long chksum;
152	unsigned long optional_pa;
153	unsigned long numclusters;
154	struct memclust_struct cluster[0];
155};
156
157struct dsr_struct {
158	long smm;			/* SMM nubber used by LMF       */
159	unsigned long  lurt_off;	/* offset to LURT table         */
160	unsigned long  sysname_off;	/* offset to sysname char count */
161};
162
163struct hwrpb_struct {
164	unsigned long phys_addr;	/* check: physical address of the hwrpb */
165	unsigned long id;		/* check: "HWRPB\0\0\0" */
166	unsigned long revision;	
167	unsigned long size;		/* size of hwrpb */
168	unsigned long cpuid;
169	unsigned long pagesize;		/* 8192, I hope */
170	unsigned long pa_bits;		/* number of physical address bits */
171	unsigned long max_asn;
172	unsigned char ssn[16];		/* system serial number: big bother is watching */
173	unsigned long sys_type;
174	unsigned long sys_variation;
175	unsigned long sys_revision;
176	unsigned long intr_freq;	/* interval clock frequency * 4096 */
177	unsigned long cycle_freq;	/* cycle counter frequency */
178	unsigned long vptb;		/* Virtual Page Table Base address */
179	unsigned long res1;
180	unsigned long tbhb_offset;	/* Translation Buffer Hint Block */
181	unsigned long nr_processors;
182	unsigned long processor_size;
183	unsigned long processor_offset;
184	unsigned long ctb_nr;
185	unsigned long ctb_size;		/* console terminal block size */
186	unsigned long ctbt_offset;	/* console terminal block table offset */
187	unsigned long crb_offset;	/* console callback routine block */
188	unsigned long mddt_offset;	/* memory data descriptor table */
189	unsigned long cdb_offset;	/* configuration data block (or NULL) */
190	unsigned long frut_offset;	/* FRU table (or NULL) */
191	void (*save_terminal)(unsigned long);
192	unsigned long save_terminal_data;
193	void (*restore_terminal)(unsigned long);
194	unsigned long restore_terminal_data;
195	void (*CPU_restart)(unsigned long);
196	unsigned long CPU_restart_data;
197	unsigned long res2;
198	unsigned long res3;
199	unsigned long chksum;
200	unsigned long rxrdy;
201	unsigned long txrdy;
202	unsigned long dsr_offset;	/* "Dynamic System Recognition Data Block Table" */
203};
204
205#ifdef __KERNEL__
206
207extern struct hwrpb_struct *hwrpb;
208
209static inline void
210hwrpb_update_checksum(struct hwrpb_struct *h)
211{
212	unsigned long sum = 0, *l;
213        for (l = (unsigned long *) h; l < (unsigned long *) &h->chksum; ++l)
214                sum += *l;
215        h->chksum = sum;
216}
217
218#endif /* __KERNEL__ */
219
220#endif /* __ALPHA_HWRPB_H */
v6.2
  1/* SPDX-License-Identifier: GPL-2.0 */
  2#ifndef __ALPHA_HWRPB_H
  3#define __ALPHA_HWRPB_H
  4
  5#define INIT_HWRPB ((struct hwrpb_struct *) 0x10000000)
  6
  7/*
  8 * DEC processor types for Alpha systems.  Found in HWRPB.
  9 * These values are architected.
 10 */
 11
 12#define EV3_CPU                 1       /* EV3                  */
 13#define EV4_CPU                 2       /* EV4 (21064)          */
 14#define LCA4_CPU                4       /* LCA4 (21066/21068)   */
 15#define EV5_CPU                 5       /* EV5 (21164)          */
 16#define EV45_CPU                6       /* EV4.5 (21064/xxx)    */
 17#define EV56_CPU		7	/* EV5.6 (21164)	*/
 18#define EV6_CPU			8	/* EV6 (21264)		*/
 19#define PCA56_CPU		9	/* PCA56 (21164PC)	*/
 20#define PCA57_CPU		10	/* PCA57 (notyet)	*/
 21#define EV67_CPU		11	/* EV67 (21264A)	*/
 22#define EV68CB_CPU		12	/* EV68CB (21264C)	*/
 23#define EV68AL_CPU		13	/* EV68AL (21264B)	*/
 24#define EV68CX_CPU		14	/* EV68CX (21264D)	*/
 25#define EV7_CPU			15	/* EV7 (21364)		*/
 26#define EV79_CPU		16	/* EV79 (21364??)	*/
 27#define EV69_CPU		17	/* EV69 (21264/EV69A)	*/
 28
 29/*
 30 * DEC system types for Alpha systems.  Found in HWRPB.
 31 * These values are architected.
 32 */
 33
 34#define ST_ADU			  1	/* Alpha ADU systype	*/
 35#define ST_DEC_4000		  2	/* Cobra systype	*/
 36#define ST_DEC_7000		  3	/* Ruby systype		*/
 37#define ST_DEC_3000_500		  4	/* Flamingo systype	*/
 38#define ST_DEC_2000_300		  6	/* Jensen systype	*/
 39#define ST_DEC_3000_300		  7	/* Pelican systype	*/
 40#define ST_DEC_2100_A500	  9	/* Sable systype	*/
 41#define ST_DEC_AXPVME_64	 10	/* AXPvme system type	*/
 42#define ST_DEC_AXPPCI_33	 11	/* NoName system type	*/
 43#define ST_DEC_TLASER		 12	/* Turbolaser systype	*/
 44#define ST_DEC_2100_A50		 13	/* Avanti systype	*/
 45#define ST_DEC_MUSTANG		 14	/* Mustang systype	*/
 46#define ST_DEC_ALCOR		 15	/* Alcor (EV5) systype	*/
 47#define ST_DEC_1000		 17	/* Mikasa systype	*/
 48#define ST_DEC_EB64		 18	/* EB64 systype		*/
 49#define ST_DEC_EB66		 19	/* EB66 systype		*/
 50#define ST_DEC_EB64P		 20	/* EB64+ systype	*/
 51#define ST_DEC_BURNS		 21	/* laptop systype	*/
 52#define ST_DEC_RAWHIDE		 22	/* Rawhide systype	*/
 53#define ST_DEC_K2		 23	/* K2 systype		*/
 54#define ST_DEC_LYNX		 24	/* Lynx systype		*/
 55#define ST_DEC_XL		 25	/* Alpha XL systype	*/
 56#define ST_DEC_EB164		 26	/* EB164 systype	*/
 57#define ST_DEC_NORITAKE		 27	/* Noritake systype	*/
 58#define ST_DEC_CORTEX		 28	/* Cortex systype	*/
 59#define ST_DEC_MIATA		 30	/* Miata systype        */
 60#define ST_DEC_XXM		 31	/* XXM systype		*/
 61#define ST_DEC_TAKARA		 32	/* Takara systype	*/
 62#define ST_DEC_YUKON		 33	/* Yukon systype	*/
 63#define ST_DEC_TSUNAMI		 34	/* Tsunami systype	*/
 64#define ST_DEC_WILDFIRE		 35	/* Wildfire systype	*/
 65#define ST_DEC_CUSCO		 36	/* CUSCO systype	*/
 66#define ST_DEC_EIGER		 37	/* Eiger systype	*/
 67#define ST_DEC_TITAN		 38	/* Titan systype	*/
 68#define ST_DEC_MARVEL		 39	/* Marvel systype	*/
 69
 70/* UNOFFICIAL!!! */
 71#define ST_UNOFFICIAL_BIAS	100
 72#define ST_DTI_RUFFIAN		101	/* RUFFIAN systype	*/
 73
 74/* Alpha Processor, Inc. systems */
 75#define ST_API_BIAS		200
 76#define ST_API_NAUTILUS		201	/* UP1000 systype	*/
 77
 78struct pcb_struct {
 79	unsigned long ksp;
 80	unsigned long usp;
 81	unsigned long ptbr;
 82	unsigned int pcc;
 83	unsigned int asn;
 84	unsigned long unique;
 85	unsigned long flags;
 86	unsigned long res1, res2;
 87};
 88
 89struct percpu_struct {
 90	unsigned long hwpcb[16];
 91	unsigned long flags;
 92	unsigned long pal_mem_size;
 93	unsigned long pal_scratch_size;
 94	unsigned long pal_mem_pa;
 95	unsigned long pal_scratch_pa;
 96	unsigned long pal_revision;
 97	unsigned long type;
 98	unsigned long variation;
 99	unsigned long revision;
100	unsigned long serial_no[2];
101	unsigned long logout_area_pa;
102	unsigned long logout_area_len;
103	unsigned long halt_PCBB;
104	unsigned long halt_PC;
105	unsigned long halt_PS;
106	unsigned long halt_arg;
107	unsigned long halt_ra;
108	unsigned long halt_pv;
109	unsigned long halt_reason;
110	unsigned long res;
111	unsigned long ipc_buffer[21];
112	unsigned long palcode_avail[16];
113	unsigned long compatibility;
114	unsigned long console_data_log_pa;
115	unsigned long console_data_log_length;
116	unsigned long bcache_info;
117};
118
119struct procdesc_struct {
120	unsigned long weird_vms_stuff;
121	unsigned long address;
122};
123
124struct vf_map_struct {
125	unsigned long va;
126	unsigned long pa;
127	unsigned long count;
128};
129
130struct crb_struct {
131	struct procdesc_struct * dispatch_va;
132	struct procdesc_struct * dispatch_pa;
133	struct procdesc_struct * fixup_va;
134	struct procdesc_struct * fixup_pa;
135	/* virtual->physical map */
136	unsigned long map_entries;
137	unsigned long map_pages;
138	struct vf_map_struct map[1];
139};
140
141struct memclust_struct {
142	unsigned long start_pfn;
143	unsigned long numpages;
144	unsigned long numtested;
145	unsigned long bitmap_va;
146	unsigned long bitmap_pa;
147	unsigned long bitmap_chksum;
148	unsigned long usage;
149};
150
151struct memdesc_struct {
152	unsigned long chksum;
153	unsigned long optional_pa;
154	unsigned long numclusters;
155	struct memclust_struct cluster[];
156};
157
158struct dsr_struct {
159	long smm;			/* SMM nubber used by LMF       */
160	unsigned long  lurt_off;	/* offset to LURT table         */
161	unsigned long  sysname_off;	/* offset to sysname char count */
162};
163
164struct hwrpb_struct {
165	unsigned long phys_addr;	/* check: physical address of the hwrpb */
166	unsigned long id;		/* check: "HWRPB\0\0\0" */
167	unsigned long revision;	
168	unsigned long size;		/* size of hwrpb */
169	unsigned long cpuid;
170	unsigned long pagesize;		/* 8192, I hope */
171	unsigned long pa_bits;		/* number of physical address bits */
172	unsigned long max_asn;
173	unsigned char ssn[16];		/* system serial number: big bother is watching */
174	unsigned long sys_type;
175	unsigned long sys_variation;
176	unsigned long sys_revision;
177	unsigned long intr_freq;	/* interval clock frequency * 4096 */
178	unsigned long cycle_freq;	/* cycle counter frequency */
179	unsigned long vptb;		/* Virtual Page Table Base address */
180	unsigned long res1;
181	unsigned long tbhb_offset;	/* Translation Buffer Hint Block */
182	unsigned long nr_processors;
183	unsigned long processor_size;
184	unsigned long processor_offset;
185	unsigned long ctb_nr;
186	unsigned long ctb_size;		/* console terminal block size */
187	unsigned long ctbt_offset;	/* console terminal block table offset */
188	unsigned long crb_offset;	/* console callback routine block */
189	unsigned long mddt_offset;	/* memory data descriptor table */
190	unsigned long cdb_offset;	/* configuration data block (or NULL) */
191	unsigned long frut_offset;	/* FRU table (or NULL) */
192	void (*save_terminal)(unsigned long);
193	unsigned long save_terminal_data;
194	void (*restore_terminal)(unsigned long);
195	unsigned long restore_terminal_data;
196	void (*CPU_restart)(unsigned long);
197	unsigned long CPU_restart_data;
198	unsigned long res2;
199	unsigned long res3;
200	unsigned long chksum;
201	unsigned long rxrdy;
202	unsigned long txrdy;
203	unsigned long dsr_offset;	/* "Dynamic System Recognition Data Block Table" */
204};
205
206#ifdef __KERNEL__
207
208extern struct hwrpb_struct *hwrpb;
209
210static inline void
211hwrpb_update_checksum(struct hwrpb_struct *h)
212{
213	unsigned long sum = 0, *l;
214        for (l = (unsigned long *) h; l < (unsigned long *) &h->chksum; ++l)
215                sum += *l;
216        h->chksum = sum;
217}
218
219#endif /* __KERNEL__ */
220
221#endif /* __ALPHA_HWRPB_H */