xref: /openbmc/linux/arch/mips/include/asm/sn/kldir.h (revision 8dd06ef34b6e2f41b29fbf5fc1663780f2524285)
1*aa2d74f9SThomas Bogendoerfer /* SPDX-License-Identifier: GPL-2.0 */
2*aa2d74f9SThomas Bogendoerfer 
3384740dcSRalf Baechle #ifndef _ASM_SN_KLDIR_H
4384740dcSRalf Baechle #define _ASM_SN_KLDIR_H
5384740dcSRalf Baechle 
6384740dcSRalf Baechle #define KLDIR_MAGIC		0x434d5f53505f5357
7384740dcSRalf Baechle 
8384740dcSRalf Baechle #define KLDIR_OFF_MAGIC			0x00
9384740dcSRalf Baechle #define KLDIR_OFF_OFFSET		0x08
10384740dcSRalf Baechle #define KLDIR_OFF_POINTER		0x10
11384740dcSRalf Baechle #define KLDIR_OFF_SIZE			0x18
12384740dcSRalf Baechle #define KLDIR_OFF_COUNT			0x20
13384740dcSRalf Baechle #define KLDIR_OFF_STRIDE		0x28
14384740dcSRalf Baechle 
15384740dcSRalf Baechle #define KLDIR_ENT_SIZE			0x40
16384740dcSRalf Baechle #define KLDIR_MAX_ENTRIES		(0x400 / 0x40)
17384740dcSRalf Baechle 
18384740dcSRalf Baechle #ifndef __ASSEMBLY__
19384740dcSRalf Baechle typedef struct kldir_ent_s {
20384740dcSRalf Baechle 	u64		magic;		/* Indicates validity of entry	    */
21384740dcSRalf Baechle 	off_t		offset;		/* Offset from start of node space  */
22384740dcSRalf Baechle 	unsigned long	pointer;	/* Pointer to area in some cases    */
23384740dcSRalf Baechle 	size_t		size;		/* Size in bytes		    */
24384740dcSRalf Baechle 	u64		count;		/* Repeat count if array, 1 if not  */
25384740dcSRalf Baechle 	size_t		stride;		/* Stride if array, 0 if not	    */
26384740dcSRalf Baechle 	char		rsvd[16];	/* Pad entry to 0x40 bytes	    */
27384740dcSRalf Baechle 	/* NOTE: These 16 bytes are used in the Partition KLDIR
28384740dcSRalf Baechle 	   entry to store partition info. Refer to klpart.h for this. */
29384740dcSRalf Baechle } kldir_ent_t;
30384740dcSRalf Baechle #endif /* !__ASSEMBLY__ */
31384740dcSRalf Baechle 
32*aa2d74f9SThomas Bogendoerfer #ifdef CONFIG_SGI_IP27
33*aa2d74f9SThomas Bogendoerfer #include <asm/sn/sn0/kldir.h>
34*aa2d74f9SThomas Bogendoerfer #endif
35*aa2d74f9SThomas Bogendoerfer 
36384740dcSRalf Baechle #endif /* _ASM_SN_KLDIR_H */
37