1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 #ifndef _SYSTEMCFG_H 3 #define _SYSTEMCFG_H 4 5 /* 6 * Copyright (C) 2002 Peter Bergner <bergner@vnet.ibm.com>, IBM 7 * Copyright (C) 2005 Benjamin Herrenschmidy <benh@kernel.crashing.org>, 8 * IBM Corp. 9 */ 10 11 #ifdef CONFIG_PPC64 12 13 /* 14 * If the major version changes we are incompatible. 15 * Minor version changes are a hint. 16 */ 17 #define SYSTEMCFG_MAJOR 1 18 #define SYSTEMCFG_MINOR 1 19 20 #include <linux/types.h> 21 22 struct systemcfg { 23 __u8 eye_catcher[16]; /* Eyecatcher: SYSTEMCFG:PPC64 0x00 */ 24 struct { /* Systemcfg version numbers */ 25 __u32 major; /* Major number 0x10 */ 26 __u32 minor; /* Minor number 0x14 */ 27 } version; 28 29 /* Note about the platform flags: it now only contains the lpar 30 * bit. The actual platform number is dead and buried 31 */ 32 __u32 platform; /* Platform flags 0x18 */ 33 __u32 processor; /* Processor type 0x1C */ 34 __u64 processorCount; /* # of physical processors 0x20 */ 35 __u64 physicalMemorySize; /* Size of real memory(B) 0x28 */ 36 __u64 tb_orig_stamp; /* (NU) Timebase at boot 0x30 */ 37 __u64 tb_ticks_per_sec; /* Timebase tics / sec 0x38 */ 38 __u64 tb_to_xs; /* (NU) Inverse of TB to 2^20 0x40 */ 39 __u64 stamp_xsec; /* (NU) 0x48 */ 40 __u64 tb_update_count; /* (NU) Timebase atomicity ctr 0x50 */ 41 __u32 tz_minuteswest; /* (NU) Min. west of Greenwich 0x58 */ 42 __u32 tz_dsttime; /* (NU) Type of dst correction 0x5C */ 43 __u32 dcache_size; /* L1 d-cache size 0x60 */ 44 __u32 dcache_line_size; /* L1 d-cache line size 0x64 */ 45 __u32 icache_size; /* L1 i-cache size 0x68 */ 46 __u32 icache_line_size; /* L1 i-cache line size 0x6C */ 47 }; 48 49 extern struct systemcfg *systemcfg; 50 51 #endif /* CONFIG_PPC64 */ 52 #endif /* _SYSTEMCFG_H */ 53