Subrata Banik (subrata.banik(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18449
-gerrit
commit fb4e7638e4d6d10863d654414cc98d02d3bc55ce
Author: Subrata Banik <subrata.banik(a)intel.com>
Date: Wed Feb 22 15:01:26 2017 +0530
soc/intel/glk: Add Kconfig and Makefile.inc for GLK SoC[WIP]
Copied from APL latest git.
Change-Id: Icf1bb95cd2503e12f8ce26d77d2cd940a2ea1b69
Signed-off-by: Subrata Banik <subrata.banik(a)intel.com>
---
src/soc/intel/glk/Kconfig | 254 +++++++++++++++++++++++++++++++++++++++++
src/soc/intel/glk/Makefile.inc | 42 +++++++
2 files changed, 296 insertions(+)
diff --git a/src/soc/intel/glk/Kconfig b/src/soc/intel/glk/Kconfig
new file mode 100644
index 0000000..c882e58
--- /dev/null
+++ b/src/soc/intel/glk/Kconfig
@@ -0,0 +1,254 @@
+config SOC_INTEL_GLK
+ bool
+ help
+ Intel GLK support
+
+if SOC_INTEL_GLK
+
+config CPU_SPECIFIC_OPTIONS
+ def_bool y
+ select ACPI_INTEL_HARDWARE_SLEEP_VALUES
+ select ARCH_BOOTBLOCK_X86_32
+ select ARCH_RAMSTAGE_X86_32
+ select ARCH_ROMSTAGE_X86_32
+ select ARCH_VERSTAGE_X86_32
+ select BOOTBLOCK_CONSOLE
+ select BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY if BOOT_DEVICE_SPI_FLASH
+ select BOOT_DEVICE_SUPPORTS_WRITES
+ # CPU specific options
+ select CPU_INTEL_FIRMWARE_INTERFACE_TABLE
+ select IOAPIC
+ select SMP
+ select SSE2
+ select SUPPORT_CPU_UCODE_IN_CBFS
+ # Audio options
+ select ACPI_NHLT
+ select SOC_INTEL_COMMON_NHLT
+ # Misc options
+ select C_ENVIRONMENT_BOOTBLOCK
+ select CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM if RELOCATABLE_RAMSTAGE
+ select COLLECT_TIMESTAMPS
+ select COMMON_FADT
+ select GENERIC_GPIO_LIB
+ select HAVE_INTEL_FIRMWARE
+ select HAVE_SMI_HANDLER
+ select MRC_SETTINGS_PROTECT
+ select NO_FIXED_XIP_ROM_SIZE
+ select NO_XIP_EARLY_STAGES
+ select PARALLEL_MP
+ select PARALLEL_MP_AP_WORK
+ select PCIEXP_ASPM
+ select PCIEXP_COMMON_CLOCK
+ select PCIEXP_CLK_PM
+ select PCIEXP_L1_SUB_STATE
+ select POSTCAR_CONSOLE
+ select POSTCAR_STAGE
+ select REG_SCRIPT
+ select RELOCATABLE_RAMSTAGE # Build fails if this is not selected
+ select RTC
+ select SMM_TSEG
+ select SOC_INTEL_COMMON
+ select SOC_INTEL_COMMON_ACPI
+ select SOC_INTEL_COMMON_ACPI_WAKE_SOURCE
+ select SOC_INTEL_COMMON_LPSS_I2C
+ select SOC_INTEL_COMMON_SMI
+ select SOC_INTEL_COMMON_SPI_FLASH_PROTECT
+ select UDELAY_TSC
+ select TSC_CONSTANT_RATE
+ select TSC_MONOTONIC_TIMER
+ select HAVE_MONOTONIC_TIMER
+ select PLATFORM_USES_FSP2_0
+ select HAVE_HARD_RESET
+ select SOC_INTEL_COMMON
+ select SOC_INTEL_COMMON_GFX_OPREGION
+ select ADD_VBT_DATA_FILE
+
+config CHROMEOS
+ select CHROMEOS_RAMOOPS_DYNAMIC
+ select EC_SOFTWARE_SYNC if EC_GOOGLE_CHROMEEC
+ select SEPARATE_VERSTAGE
+ select VBOOT_OPROM_MATTERS
+ select VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT
+ select VBOOT_STARTS_IN_BOOTBLOCK
+ select VBOOT_VBNV_CMOS
+ select VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
+ select VIRTUAL_DEV_SWITCH
+
+config TPM_ON_FAST_SPI
+ bool
+ default n
+ select LPC_TPM
+ help
+ TPM part is conntected on Fast SPI interface, but the LPC MMIO
+ TPM transactions are decoded and serialized over the SPI interface.
+
+config SOC_INTEL_COMMON_RESET
+ bool
+ default y
+
+config MMCONF_BASE_ADDRESS
+ hex "PCI MMIO Base Address"
+ default 0xe0000000
+
+config IOSF_BASE_ADDRESS
+ hex "MMIO Base Address of sideband bus"
+ default 0xd0000000
+
+config DCACHE_RAM_BASE
+ hex "Base address of cache-as-RAM"
+ default 0xfef00000
+
+config DCACHE_RAM_SIZE
+ hex "Length in bytes of cache-as-RAM"
+ default 0xc0000
+ help
+ The size of the cache-as-ram region required during bootblock
+ and/or romstage.
+
+config DCACHE_BSP_STACK_SIZE
+ hex
+ default 0x4000
+ help
+ The amount of anticipated stack usage in CAR by bootblock and
+ other stages.
+
+config CPU_ADDR_BITS
+ int
+ default 36
+
+config SOC_INTEL_COMMON_LPSS_I2C_CLOCK_MHZ
+ depends on SOC_INTEL_COMMON_LPSS_I2C
+ int
+ default 133
+
+config CONSOLE_UART_BASE_ADDRESS
+ depends on CONSOLE_SERIAL
+ hex "MMIO base address for UART"
+ default 0xde000000
+
+config SOC_UART_DEBUG
+ bool "Enable SoC UART debug port selected by UART_FOR_CONSOLE."
+ default n
+ select CONSOLE_SERIAL
+ select DRIVERS_UART
+ select DRIVERS_UART_8250MEM_32
+ select NO_UART_ON_SUPERIO
+
+# 32KiB bootblock is all that is mapped in by the CSE at top of 4GiB.
+config C_ENV_BOOTBLOCK_SIZE
+ hex
+ default 0x8000
+
+# This SoC does not map SPI flash like many previous SoC. Therefore we provide
+# a custom media driver that facilitates mapping
+config X86_TOP4G_BOOTMEDIA_MAP
+ bool
+ default n
+
+config ROMSTAGE_ADDR
+ hex
+ default 0xfef20000
+ help
+ The base address (in CAR) where romstage should be linked
+
+config VERSTAGE_ADDR
+ hex
+ default 0xfef40000
+ help
+ The base address (in CAR) where verstage should be linked
+
+config CACHE_MRC_SETTINGS
+ bool
+ default y
+
+config MRC_SETTINGS_VARIABLE_DATA
+ bool
+ default y
+
+config FSP_M_ADDR
+ hex
+ default 0xfef40000
+ help
+ The address FSP-M will be relocated to during build time
+
+config NEED_LBP2
+ bool "Write contents for logical boot partition 2."
+ default n
+ help
+ Write the contents from a file into the logical boot partition 2
+ region defined by LBP2_FMAP_NAME.
+
+config LBP2_FMAP_NAME
+ string "Name of FMAP region to put logical boot partition 2"
+ depends on NEED_LBP2
+ default "SIGN_CSE"
+ help
+ Name of FMAP region to write logical boot partition 2 data.
+
+config LBP2_FILE_NAME
+ string "Path of file to write to logical boot partition 2 region"
+ depends on NEED_LBP2
+ default "3rdparty/blobs/mainboard/$(CONFIG_MAINBOARD_DIR)/lbp2.bin"
+ help
+ Name of file to store in the logical boot partition 2 region.
+
+config NEED_IFWI
+ bool "Write content into IFWI region"
+ default n
+ help
+ Write the content from a file into IFWI region defined by
+ IFWI_FMAP_NAME.
+
+config IFWI_FMAP_NAME
+ string "Name of FMAP region to pull IFWI into"
+ depends on NEED_IFWI
+ default "IFWI"
+ help
+ Name of FMAP region to write IFWI.
+
+config IFWI_FILE_NAME
+ string "Path of file to write to IFWI region"
+ depends on NEED_IFWI
+ default "3rdparty/blobs/mainboard/$(CONFIG_MAINBOARD_DIR)/ifwi.bin"
+ help
+ Name of file to store in the IFWI region.
+
+config HEAP_SIZE
+ hex
+ default 0x8000
+
+choice
+ prompt "Cache-as-ram implementation"
+ default CAR_CQOS
+ help
+ This option allows you to select how cache-as-ram (CAR) is set up.
+
+config CAR_NEM
+ bool "Non-evict mode"
+ help
+ Traditionally, CAR is set up by using Non-Evict mode. This method
+ does not allow CAR and cache to co-exist, because cache fills are
+ block in NEM mode.
+
+config CAR_CQOS
+ bool "Cache Quality of Service"
+ help
+ Cache Quality of Service allows more fine-grained control of cache
+ usage. As result, it is possible to set up portion of L2 cache for
+ CAR and use remainder for actual caching.
+
+endchoice
+
+config SPI_FLASH_INCLUDE_ALL_DRIVERS
+ bool
+ default n
+
+config SMM_RESERVED_SIZE
+ hex
+ default 0x100000
+
+config IFD_CHIPSET
+ string
+ default "aplk"
+
+endif
diff --git a/src/soc/intel/glk/Makefile.inc b/src/soc/intel/glk/Makefile.inc
new file mode 100644
index 0000000..b2a430a
--- /dev/null
+++ b/src/soc/intel/glk/Makefile.inc
@@ -0,0 +1,42 @@
+ifeq ($(CONFIG_SOC_INTEL_GLK),y)
+
+subdirs-y += ../../../cpu/intel/microcode
+subdirs-y += ../../../cpu/intel/turbo
+subdirs-y += ../../../cpu/x86/lapic
+subdirs-y += ../../../cpu/x86/mtrr
+subdirs-y += ../../../cpu/x86/smm
+subdirs-y += ../../../cpu/x86/tsc
+subdirs-y += ../../../cpu/x86/cache
+subdirs-y += ../common/basecode
+subdirs-y += ../common/block/*
+
+CPPFLAGS_common += -I$(src)/soc/intel/glk/include
+CPPFLAGS_common += -I$(src)/vendorcode/intel/fsp/fsp2_0/glk
+
+# Since FSP-M runs in CAR we need to relocate it to a specific address
+$(CONFIG_FSP_M_CBFS)-options := -b $(CONFIG_FSP_M_ADDR)
+
+ifeq ($(CONFIG_NEED_LBP2),y)
+files_added::
+ $(CBFSTOOL) $(obj)/coreboot.rom write -r $(CONFIG_LBP2_FMAP_NAME) -f $(CONFIG_LBP2_FILE_NAME) --fill-upward
+endif
+
+# Bootblock on GLK platform lies in the IFWI region. In order to place
+# the bootblock at the right location in IFWI image -
+# a. Using ifwitool:
+# 1. Create IFWI image (ifwi.bin.tmp) from input image
+# (CONFIG_IFWI_FILE_NAME).
+# 2. Delete OBBP sub-partition, if present.
+# 3. Replace IBBL directory entry in IBBP sub-partition with currently
+# generated bootblock.bin.
+# b. Using cbfstool:
+# 1. Write ifwi.bin.tmp to coreboot.rom using CONFIG_IFWI_FMAP_NAME.
+ifeq ($(CONFIG_NEED_IFWI),y)
+files_added:: $(IFWITOOL)
+ $(IFWITOOL) $(CONFIG_IFWI_FILE_NAME) create -f $(objcbfs)/ifwi.bin.tmp
+ $(IFWITOOL) $(objcbfs)/ifwi.bin.tmp delete -n OBBP
+ $(IFWITOOL) $(objcbfs)/ifwi.bin.tmp replace -n IBBP -f $(objcbfs)/bootblock.bin -d -e IBBL
+ $(CBFSTOOL) $(obj)/coreboot.rom write -r $(CONFIG_IFWI_FMAP_NAME) -f $(objcbfs)/ifwi.bin.tmp --fill-upward
+endif
+
+endif
Nicola Corna (nicola(a)corna.info) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18329
-gerrit
commit a27d5f9cbea73efc50469478909c35f8786e13cb
Author: Nicola Corna <nicola(a)corna.info>
Date: Sat Feb 11 14:52:24 2017 +0100
ec/lenovo/h8: Fix mute LEDs
thinkpad_acpi expects a SSMS method to turn on/off the mute LED
and a MMTS method to turn on/off the microphone mute LED.
With these methods implemented the driver can correctly sync
the LEDs with the corresponding statuses.
There seems to be two different bits to mute the audio in the
Lenovo H8 EC:
* AMUT, used internally (for example to disable the audio before
entering S3).
* ALMT, controllable by the OS, which also toggles the mute LED
(if present).
Tested on a X220T and on a X201.
Change-Id: I578f95f9619a53fd35f8a8bfe5564aeb6c789212
Signed-off-by: Nicola Corna <nicola(a)corna.info>
---
src/ec/lenovo/h8/acpi/ec.asl | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl
index 497dde4..b8350ad 100644
--- a/src/ec/lenovo/h8/acpi/ec.asl
+++ b/src/ec/lenovo/h8/acpi/ec.asl
@@ -39,8 +39,11 @@ Device(EC)
DKR2, 1, /* Dock register 2 */
Offset (0x2a),
EVNT, 8, /* write will trigger EC event */
+ Offset (0x30),
+ , 6,
+ ALMT, 1, /* Audio Mute + LED */
Offset (0x3a),
- AMUT, 1, /* Audio Mute */
+ AMUT, 1, /* Audio Mute (internal use) */
, 3,
BTEB, 1,
WLEB, 1,
@@ -362,6 +365,23 @@ Device(EC)
{
Return (TBSW << 3)
}
+ /* Mute audio */
+ Method (SSMS, 1, NotSerialized)
+ {
+ Store(Arg0, ALMT)
+ }
+ /* Control mute microphone LED */
+ Method (MMTS, 1, NotSerialized)
+ {
+ If (Arg0)
+ {
+ TLED(0x8E)
+ }
+ Else
+ {
+ TLED(0x0E)
+ }
+ }
/* Version */
Method (MHKV, 0, NotSerialized)
{
Subrata Banik (subrata.banik(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18453
-gerrit
commit b8fd97e313ee8f0a6a6c029cd72fcebbe32f69e2
Author: Subrata Banik <subrata.banik(a)intel.com>
Date: Wed Feb 22 16:22:58 2017 +0530
soc/intel/glk: Include cache_as_ram_fsp.S inside glk/bootblock
Add option to use FSP APIs to initialize & Tear Down the Cache-As-Ram.
Change-Id: I4964fa27967323062c6243e023d2caa82b7f0440
Signed-off-by: Subrata Banik <subrata.banik(a)intel.com>
---
src/soc/intel/glk/Makefile.inc | 2 +
src/soc/intel/glk/bootblock/cache_as_ram_fsp.S | 111 +++++++++++++++++++++++++
2 files changed, 113 insertions(+)
diff --git a/src/soc/intel/glk/Makefile.inc b/src/soc/intel/glk/Makefile.inc
index b2a430a..8ca6162 100644
--- a/src/soc/intel/glk/Makefile.inc
+++ b/src/soc/intel/glk/Makefile.inc
@@ -10,6 +10,8 @@ subdirs-y += ../../../cpu/x86/cache
subdirs-y += ../common/basecode
subdirs-y += ../common/block/*
+bootblock-$(CONFIG_FSP_CAR) += bootblock/cache_as_ram_fsp.S
+
CPPFLAGS_common += -I$(src)/soc/intel/glk/include
CPPFLAGS_common += -I$(src)/vendorcode/intel/fsp/fsp2_0/glk
diff --git a/src/soc/intel/glk/bootblock/cache_as_ram_fsp.S b/src/soc/intel/glk/bootblock/cache_as_ram_fsp.S
new file mode 100644
index 0000000..f55582a
--- /dev/null
+++ b/src/soc/intel/glk/bootblock/cache_as_ram_fsp.S
@@ -0,0 +1,111 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015-2016 Intel Corp.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <device/pci_def.h>
+#include <cpu/x86/mtrr.h>
+#include <cpu/x86/cache.h>
+#include <cpu/x86/cr.h>
+#include <cpu/x86/post_code.h>
+#include <soc/cpu.h>
+
+#include <../../../arch/x86/walkcbfs.S>
+
+#define FSP_HDR_OFFSET 0x94
+
+.global bootblock_pre_c_entry
+bootblock_pre_c_entry:
+
+.global cache_as_ram
+cache_as_ram:
+ post_code(0x21)
+
+ /* find fsp in cbfs */
+ lea fsp_name, %esi
+ mov $1f, %esp
+ jmp walkcbfs_asm
+1:
+ cmp $0, %eax
+ jz .halt_forever
+ mov CBFS_FILE_OFFSET(%eax), %ebx
+ bswap %ebx
+ add %eax, %ebx
+ add FSP_HDR_OFFSET, %ebx
+
+ /*
+ * ebx = FSP INFO HEADER
+ * Calculate entry into FSP
+ */
+ mov 0x30(%ebx), %eax /* Load TempRamInitEntryOffset */
+ add 0x1c(%ebx), %eax /* add the FSP ImageBase */
+
+ /*
+ * Pass early init variables on a fake stack (no memory yet)
+ * as well as the return location
+ */
+ lea CAR_init_stack, %esp
+
+ /* call FSP binary to setup temporary stack */
+ jmp *%eax
+
+/*
+ * If the TempRamInit API is successful, then when returning, the ECX and
+ * EDX registers will point to the temporary but writeable memory range
+ * available to the bootloader where ECX is the start and EDX is the end of
+ * the range i.e. [ECX,EDX). See Apollo Lake FSP Integration Guide for more
+ * information.
+ *
+ * Return Values:
+ * EAX | Return Status
+ * ECX | Temporary Memory Start
+ * EDX | Temporary Memory End
+ * EBX, EDI, ESI, EBP, MM0, MM1 | Preserved Through API Call
+ */
+
+CAR_init_done:
+
+ /* Setup bootblock stack */
+ mov %edx, %esp
+
+ /* clear CAR_GLOBAL area as it is not shared */
+ cld
+ xor %eax, %eax
+ movl $(_car_global_end), %ecx
+ movl $(_car_global_start), %edi
+ sub %edi, %ecx
+ rep stosl
+
+ /* We can call into C functions now */
+ call bootblock_c_entry
+
+ /* Never reached */
+
+.halt_forever:
+ post_code(POST_DEAD_CODE)
+ hlt
+ jmp .halt_forever
+
+CAR_init_params:
+ .long 0 /* Microcode Location */
+ .long 0 /* Microcode Length */
+ .long 0xFFFFFFFF - CONFIG_ROM_SIZE + 1 /* Firmware Location */
+ .long CONFIG_ROM_SIZE /* Total Firmware Length */
+
+CAR_init_stack:
+ .long CAR_init_done
+ .long CAR_init_params
+
+fsp_name:
+ .ascii "blobs/fspt.bin\x00"
Subrata Banik (subrata.banik(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18452
-gerrit
commit 8b13f6cd1b325ae2e4b847fcb6ce08f5a6ca1844
Author: Subrata Banik <subrata.banik(a)intel.com>
Date: Wed Feb 22 16:20:16 2017 +0530
soc/intel/glk: Include cpu.h inside glk/include/soc
cache_as_ram code need to use cpu.h.
Change-Id: I9c10a5fcc5fc254fbaaa905f8a94d4277f10de86
Signed-off-by: Subrata Banik <subrata.banik(a)intel.com>
---
src/soc/intel/glk/include/soc/cpu.h | 100 ++++++++++++++++++++++++++++++++++++
1 file changed, 100 insertions(+)
diff --git a/src/soc/intel/glk/include/soc/cpu.h b/src/soc/intel/glk/include/soc/cpu.h
new file mode 100644
index 0000000..ea32f27
--- /dev/null
+++ b/src/soc/intel/glk/include/soc/cpu.h
@@ -0,0 +1,100 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Intel Corp.
+ * (Written by Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com> for Intel Corp.)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _SOC_GLK_CPU_H_
+#define _SOC_GLK_CPU_H_
+
+#ifndef __ASSEMBLER__
+#include <cpu/x86/msr.h>
+#include <device/device.h>
+
+void geminilake_init_cpus(struct device *dev);
+void set_max_freq(void);
+void enable_untrusted_mode(void);
+#endif
+
+#define CPUID_GEMINILAKE_A0 0x706a0
+
+#define MSR_PLATFORM_INFO 0xce
+#define MSR_POWER_MISC 0x120
+#define ENABLE_IA_UNTRUSTED (1 << 6)
+#define FLUSH_DL1_L2 (1 << 8)
+#define MSR_CORE_THREAD_COUNT 0x35
+#define MSR_EVICT_CTL 0x2e0
+#define MSR_EMULATE_PM_TMR 0x121
+#define EMULATE_PM_TMR_EN (1 << 16)
+#define MSR_PREFETCH_CTL 0x1a4
+#define PREFETCH_L1_DISABLE (1 << 0)
+#define PREFETCH_L2_DISABLE (1 << 2)
+
+#define MSR_PKG_POWER_SKU_UNIT 0x606
+#define MSR_PKG_POWER_SKU 0x614
+#define MSR_PKG_POWER_LIMIT 0x610
+#define PKG_POWER_LIMIT_MASK (0x7fff)
+#define PKG_POWER_LIMIT_EN (1 << 15)
+#define PKG_POWER_LIMIT_CLAMP (1 << 16)
+#define PKG_POWER_LIMIT_TIME_SHIFT 17
+#define PKG_POWER_LIMIT_TIME_MASK (0x7f)
+/*
+ * For Mobile, RAPL default PL1 time window value set to 28 seconds.
+ * RAPL time window calculation defined as follows:
+ * Time Window = (float)((1+X/4)*(2*^Y), X Corresponds to [23:22],
+ * Y to [21:17] in MSR 0x610. 28 sec is equal to 0x6e.
+ */
+#define MB_POWER_LIMIT1_TIME_DEFAULT 0x6e
+
+/* Set MSR_PMG_CST_CONFIG_CONTROL[3:0] for Package C-State limit */
+#define PKG_C_STATE_LIMIT_C2_MASK 0x2
+/* Set MSR_PMG_CST_CONFIG_CONTROL[7:4] for Core C-State limit*/
+#define CORE_C_STATE_LIMIT_C10_MASK 0x70
+/* Set MSR_PMG_CST_CONFIG_CONTROL[10] to IO redirect to MWAIT */
+#define IO_MWAIT_REDIRECT_MASK 0x400
+/* Set MSR_PMG_CST_CONFIG_CONTROL[15] to lock CST_CFG [0-15] bits */
+#define CST_CFG_LOCK_MASK 0x8000
+
+#define MSR_PMG_CST_CONFIG_CONTROL 0xe2
+#define MSR_PMG_IO_CAPTURE_BASE 0xe4
+#define MSR_FEATURE_CONFIG 0x13c
+#define FEATURE_CONFIG_RESERVED_MASK 0x3ULL
+#define FEATURE_CONFIG_LOCK (1 << 0)
+#define MSR_POWER_CTL 0x1fc
+
+#define MSR_L2_QOS_MASK(reg) (0xd10 + reg)
+#define MSR_IA32_PQR_ASSOC 0xc8f
+/* MSR bits 33:32 encode slot number 0-3 */
+#define IA32_PQR_ASSOC_MASK (1 << 0 | 1 << 1)
+/* 16 way cache, 8 bits per QOS, 64 byte cache line, 1024 sets */
+#define CACHE_WAYS 16
+#define CACHE_BITS_PER_MASK 8
+#define CACHE_LINE_SIZE 64
+#define CACHE_SETS 1024
+/*
+ * Each bit in QOS mask controls this many bytes. This is calculated as:
+ * (CACHE_WAYS / CACHE_BITS_PER_MASK) * CACHE_LINE_SIZE * CACHE_SETS
+ */
+#define CACHE_QOS_SIZE_PER_BIT (128 * KiB)
+#define L2_CACHE_SIZE 0x100000
+
+#define BASE_CLOCK_MHZ 100
+
+/* Common Timer Copy (CTC) frequency - 19.2MHz. */
+#define CTC_FREQ 19200000
+
+/* This is burst mode BIT 38 in MSR_IA32_MISC_ENABLES MSR at offset 1A0h */
+#define GLK_BURST_MODE_DISABLE 0x40
+
+#endif /* _SOC_GLK_CPU_H_ */