mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: src/soc: Capitalize CPU, ACPI, RAM and ROM
BUG=None BRANCH=None TEST=None Change-Id: Ia4d80dace9a2afaba7aae302cf6956897320ff9c Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/15963 Tested-by: build bot (Jenkins) Reviewed-by: Omar Pakker Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-on: https://chromium-review.googlesource.com/366285 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
parent
85a61b089d
commit
12d1e36a7c
41 changed files with 54 additions and 54 deletions
|
@ -22,8 +22,8 @@
|
||||||
void bootblock_soc_init(void)
|
void bootblock_soc_init(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* not only for speed but for preventing the cpu from crashing.
|
* not only for speed but for preventing the CPU from crashing.
|
||||||
* the cpu is not happy when cache is cleaned without mmu turned on.
|
* the CPU is not happy when cache is cleaned without mmu turned on.
|
||||||
*/
|
*/
|
||||||
mmu_init();
|
mmu_init();
|
||||||
mmu_config_range(0, 4096, DCACHE_OFF);
|
mmu_config_range(0, 4096, DCACHE_OFF);
|
||||||
|
|
|
@ -89,7 +89,7 @@ static void pci_domain_set_resources(device_t dev)
|
||||||
ss = pci_read_config16(mc_dev, 0x6c);
|
ss = pci_read_config16(mc_dev, 0x6c);
|
||||||
ss = ((ss >> 8) & 0xf);
|
ss = ((ss >> 8) & 0xf);
|
||||||
tomk = (2 * 1024) << ss;
|
tomk = (2 * 1024) << ss;
|
||||||
printk(BIOS_DEBUG, "I would set ram size to %ld Mbytes\n", (tomk >> 10));
|
printk(BIOS_DEBUG, "I would set RAM size to %ld Mbytes\n", (tomk >> 10));
|
||||||
/* Compute the top of Low memory */
|
/* Compute the top of Low memory */
|
||||||
tolmk = pci_tolm >> 10;
|
tolmk = pci_tolm >> 10;
|
||||||
if (tolmk >= tomk)
|
if (tolmk >= tomk)
|
||||||
|
|
|
@ -146,8 +146,8 @@ scope (\_SB) {
|
||||||
Scope(\_GPE)
|
Scope(\_GPE)
|
||||||
{
|
{
|
||||||
/* Dummy method for the Tier 1 GPIO SCI enable bit. When kernel reads
|
/* Dummy method for the Tier 1 GPIO SCI enable bit. When kernel reads
|
||||||
* _L0F in scope GPE it sets bit for gpio_tier1_sci_en in acpi enable
|
* _L0F in scope GPE it sets bit for gpio_tier1_sci_en in ACPI enable
|
||||||
* register at 0x430. For APL acpi enable register DW0 i.e., ACPI
|
* register at 0x430. For APL ACPI enable register DW0 i.e., ACPI
|
||||||
* GPE0a_EN at 0x430 is reserved.
|
* GPE0a_EN at 0x430 is reserved.
|
||||||
*/
|
*/
|
||||||
Method(_L0F, 0) {}
|
Method(_L0F, 0) {}
|
||||||
|
|
|
@ -185,11 +185,11 @@ void iosf_ssus_write(int reg, uint32_t val);
|
||||||
#define BNOCACHE 0x23
|
#define BNOCACHE 0x23
|
||||||
/* BMBOUND has a 128MiB granularity. Highest address is 0xf8000000. */
|
/* BMBOUND has a 128MiB granularity. Highest address is 0xf8000000. */
|
||||||
#define BUNIT_BMBOUND 0x25
|
#define BUNIT_BMBOUND 0x25
|
||||||
/* BMBOUND_HI describes the available ram above 4GiB. It has a
|
/* BMBOUND_HI describes the available RAM above 4GiB. It has a
|
||||||
* 256MiB granularity. Physical address bits 35:28 are compared with 31:24
|
* 256MiB granularity. Physical address bits 35:28 are compared with 31:24
|
||||||
* bits in the BMBOUND_HI register. Also note that since BMBOUND has 128MiB
|
* bits in the BMBOUND_HI register. Also note that since BMBOUND has 128MiB
|
||||||
* granularity care needs to be taken with the e820 map to account for a hole
|
* granularity care needs to be taken with the e820 map to account for a hole
|
||||||
* in the ram. */
|
* in the RAM. */
|
||||||
#define BUNIT_BMBOUND_HI 0x26
|
#define BUNIT_BMBOUND_HI 0x26
|
||||||
#define BUNIT_MMCONF_REG 0x27
|
#define BUNIT_MMCONF_REG 0x27
|
||||||
/* The SMMRR registers define the SMM region in MiB granularity. */
|
/* The SMMRR registers define the SMM region in MiB granularity. */
|
||||||
|
|
|
@ -305,7 +305,7 @@ static void *setup_stack_and_mttrs(void)
|
||||||
num_mtrrs++;
|
num_mtrrs++;
|
||||||
|
|
||||||
top_of_ram = (uint32_t)cbmem_top();
|
top_of_ram = (uint32_t)cbmem_top();
|
||||||
/* Cache 8MiB below the top of ram. The top of ram under 4GiB is the
|
/* Cache 8MiB below the top of ram. The top of RAM under 4GiB is the
|
||||||
* start of the TSEG region. It is required to be 8MiB aligned. Set
|
* start of the TSEG region. It is required to be 8MiB aligned. Set
|
||||||
* this area as cacheable so it can be used later for ramstage before
|
* this area as cacheable so it can be used later for ramstage before
|
||||||
* setting up the entire RAM as cacheable. */
|
* setting up the entire RAM as cacheable. */
|
||||||
|
@ -315,7 +315,7 @@ static void *setup_stack_and_mttrs(void)
|
||||||
slot = stack_push(slot, (top_of_ram - (8 << 20)) | MTRR_TYPE_WRBACK);
|
slot = stack_push(slot, (top_of_ram - (8 << 20)) | MTRR_TYPE_WRBACK);
|
||||||
num_mtrrs++;
|
num_mtrrs++;
|
||||||
|
|
||||||
/* Cache 8MiB at the top of ram. Top of ram is where the TSEG
|
/* Cache 8MiB at the top of ram. Top of RAM is where the TSEG
|
||||||
* region resides. However, it is not restricted to SMM mode until
|
* region resides. However, it is not restricted to SMM mode until
|
||||||
* SMM has been relocated. By setting the region to cacheable it
|
* SMM has been relocated. By setting the region to cacheable it
|
||||||
* provides faster access when relocating the SMM handler as well
|
* provides faster access when relocating the SMM handler as well
|
||||||
|
|
|
@ -100,7 +100,7 @@ config DCACHE_RAM_ROMSTAGE_STACK_SIZE
|
||||||
default 0x800
|
default 0x800
|
||||||
help
|
help
|
||||||
The amount of anticipated stack usage from the data cache
|
The amount of anticipated stack usage from the data cache
|
||||||
during pre-ram rom stage execution.
|
during pre-ram ROM stage execution.
|
||||||
|
|
||||||
config RESET_ON_INVALID_RAMSTAGE_CACHE
|
config RESET_ON_INVALID_RAMSTAGE_CACHE
|
||||||
bool "Reset the system on S3 wake when ramstage cache invalid."
|
bool "Reset the system on S3 wake when ramstage cache invalid."
|
||||||
|
|
|
@ -122,11 +122,11 @@ void reg_script_write_iosf(struct reg_script_context *ctx);
|
||||||
/* BMBOUND has a 128MiB granularity. Highest address is 0xf8000000. */
|
/* BMBOUND has a 128MiB granularity. Highest address is 0xf8000000. */
|
||||||
#define BUNIT_BMBOUND 0x25
|
#define BUNIT_BMBOUND 0x25
|
||||||
/*
|
/*
|
||||||
* BMBOUND_HI describes the available ram above 4GiB. It has a
|
* BMBOUND_HI describes the available RAM above 4GiB. It has a
|
||||||
* 256MiB granularity. Physical address bits 35:28 are compared with 31:24
|
* 256MiB granularity. Physical address bits 35:28 are compared with 31:24
|
||||||
* bits in the BMBOUND_HI register. Also note that since BMBOUND has 128MiB
|
* bits in the BMBOUND_HI register. Also note that since BMBOUND has 128MiB
|
||||||
* granularity care needs to be taken with the e820 map to account for a hole
|
* granularity care needs to be taken with the e820 map to account for a hole
|
||||||
* in the ram.
|
* in the RAM.
|
||||||
*/
|
*/
|
||||||
#define BUNIT_BMBOUND_HI 0x26
|
#define BUNIT_BMBOUND_HI 0x26
|
||||||
#define BUNIT_MMCONF_REG 0x27
|
#define BUNIT_MMCONF_REG 0x27
|
||||||
|
|
|
@ -109,7 +109,7 @@ config DCACHE_RAM_ROMSTAGE_STACK_SIZE
|
||||||
default 0x2000
|
default 0x2000
|
||||||
help
|
help
|
||||||
The amount of anticipated stack usage from the data cache
|
The amount of anticipated stack usage from the data cache
|
||||||
during pre-ram rom stage execution.
|
during pre-ram ROM stage execution.
|
||||||
|
|
||||||
config HAVE_MRC
|
config HAVE_MRC
|
||||||
bool "Add a Memory Reference Code binary"
|
bool "Add a Memory Reference Code binary"
|
||||||
|
|
|
@ -576,7 +576,7 @@ static void cpu_core_init(device_t cpu)
|
||||||
/* Clear out pending MCEs */
|
/* Clear out pending MCEs */
|
||||||
configure_mca();
|
configure_mca();
|
||||||
|
|
||||||
/* Enable the local cpu apics */
|
/* Enable the local CPU apics */
|
||||||
enable_lapic_tpr();
|
enable_lapic_tpr();
|
||||||
setup_lapic();
|
setup_lapic();
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ clear_mtrrs:
|
||||||
wrmsr
|
wrmsr
|
||||||
|
|
||||||
post_code(0x27)
|
post_code(0x27)
|
||||||
/* Enable caching for ram init code to run faster */
|
/* Enable caching for RAM init code to run faster */
|
||||||
movl $MTRR_PHYS_BASE(2), %ecx
|
movl $MTRR_PHYS_BASE(2), %ecx
|
||||||
movl $(CACHE_MRC_BASE | MTRR_TYPE_WRPROT), %eax
|
movl $(CACHE_MRC_BASE | MTRR_TYPE_WRPROT), %eax
|
||||||
xorl %edx, %edx
|
xorl %edx, %edx
|
||||||
|
|
|
@ -78,7 +78,7 @@ void *setup_stack_and_mttrs(void)
|
||||||
num_mtrrs++;
|
num_mtrrs++;
|
||||||
|
|
||||||
top_of_ram = (uint32_t)cbmem_top();
|
top_of_ram = (uint32_t)cbmem_top();
|
||||||
/* Cache 8MiB below the top of ram. The top of ram under 4GiB is the
|
/* Cache 8MiB below the top of ram. The top of RAM under 4GiB is the
|
||||||
* start of the TSEG region. It is required to be 8MiB aligned. Set
|
* start of the TSEG region. It is required to be 8MiB aligned. Set
|
||||||
* this area as cacheable so it can be used later for ramstage before
|
* this area as cacheable so it can be used later for ramstage before
|
||||||
* setting up the entire RAM as cacheable. */
|
* setting up the entire RAM as cacheable. */
|
||||||
|
@ -88,7 +88,7 @@ void *setup_stack_and_mttrs(void)
|
||||||
slot = stack_push(slot, (top_of_ram - (8 << 20)) | MTRR_TYPE_WRBACK);
|
slot = stack_push(slot, (top_of_ram - (8 << 20)) | MTRR_TYPE_WRBACK);
|
||||||
num_mtrrs++;
|
num_mtrrs++;
|
||||||
|
|
||||||
/* Cache 8MiB at the top of ram. Top of ram is where the TSEG
|
/* Cache 8MiB at the top of ram. Top of RAM is where the TSEG
|
||||||
* region resides. However, it is not restricted to SMM mode until
|
* region resides. However, it is not restricted to SMM mode until
|
||||||
* SMM has been relocated. By setting the region to cacheable it
|
* SMM has been relocated. By setting the region to cacheable it
|
||||||
* provides faster access when relocating the SMM handler as well
|
* provides faster access when relocating the SMM handler as well
|
||||||
|
|
|
@ -136,7 +136,7 @@ void smm_relocation_handler(int cpu, uintptr_t curr_smbase,
|
||||||
msr_t mtrr_cap;
|
msr_t mtrr_cap;
|
||||||
struct smm_relocation_params *relo_params = &smm_reloc_params;
|
struct smm_relocation_params *relo_params = &smm_reloc_params;
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "In relocation handler: cpu %d\n", cpu);
|
printk(BIOS_DEBUG, "In relocation handler: CPU %d\n", cpu);
|
||||||
|
|
||||||
/* Determine if the processor supports saving state in MSRs. If so,
|
/* Determine if the processor supports saving state in MSRs. If so,
|
||||||
* enable it before the non-BSPs run so that SMM relocation can occur
|
* enable it before the non-BSPs run so that SMM relocation can occur
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
void stage_cache_external_region(void **base, size_t *size)
|
void stage_cache_external_region(void **base, size_t *size)
|
||||||
{
|
{
|
||||||
/* The ramstage cache lives in the TSEG region.
|
/* The ramstage cache lives in the TSEG region.
|
||||||
* The top of ram is defined to be the TSEG base address. */
|
* The top of RAM is defined to be the TSEG base address. */
|
||||||
u32 offset = smm_region_size();
|
u32 offset = smm_region_size();
|
||||||
offset -= CONFIG_IED_REGION_SIZE;
|
offset -= CONFIG_IED_REGION_SIZE;
|
||||||
offset -= CONFIG_SMM_RESERVED_SIZE;
|
offset -= CONFIG_SMM_RESERVED_SIZE;
|
||||||
|
|
|
@ -85,7 +85,7 @@ acpi_cstate_t *soc_get_cstate_map(int *num_entries);
|
||||||
acpi_tstate_t *soc_get_tss_table(int *num_entries);
|
acpi_tstate_t *soc_get_tss_table(int *num_entries);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* soc_get_acpi_base_address returns the acpi base address for the SOC
|
* soc_get_acpi_base_address returns the ACPI base address for the SOC
|
||||||
*/
|
*/
|
||||||
uint16_t soc_get_acpi_base_address(void);
|
uint16_t soc_get_acpi_base_address(void);
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ typedef struct {
|
||||||
|
|
||||||
#define SBIOS_VERSION_SIZE 32
|
#define SBIOS_VERSION_SIZE 32
|
||||||
|
|
||||||
/* mailbox 1: public acpi methods */
|
/* mailbox 1: public ACPI methods */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u32 drdy;
|
u32 drdy;
|
||||||
u32 csts;
|
u32 csts;
|
||||||
|
|
|
@ -94,7 +94,7 @@ static void pre_mp_init(void)
|
||||||
{
|
{
|
||||||
x86_mtrr_check();
|
x86_mtrr_check();
|
||||||
|
|
||||||
/* Enable the local cpu apics */
|
/* Enable the local CPU apics */
|
||||||
setup_lapic();
|
setup_lapic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,11 +186,11 @@ void iosf_ssus_write(int reg, uint32_t val);
|
||||||
#define BNOCACHE 0x23
|
#define BNOCACHE 0x23
|
||||||
/* BMBOUND has a 128MiB granularity. Highest address is 0xf8000000. */
|
/* BMBOUND has a 128MiB granularity. Highest address is 0xf8000000. */
|
||||||
#define BUNIT_BMBOUND 0x25
|
#define BUNIT_BMBOUND 0x25
|
||||||
/* BMBOUND_HI describes the available ram above 4GiB. It has a
|
/* BMBOUND_HI describes the available RAM above 4GiB. It has a
|
||||||
* 256MiB granularity. Physical address bits 35:28 are compared with 31:24
|
* 256MiB granularity. Physical address bits 35:28 are compared with 31:24
|
||||||
* bits in the BMBOUND_HI register. Also note that since BMBOUND has 128MiB
|
* bits in the BMBOUND_HI register. Also note that since BMBOUND has 128MiB
|
||||||
* granularity care needs to be taken with the e820 map to account for a hole
|
* granularity care needs to be taken with the e820 map to account for a hole
|
||||||
* in the ram. */
|
* in the RAM. */
|
||||||
#define BUNIT_BMBOUND_HI 0x26
|
#define BUNIT_BMBOUND_HI 0x26
|
||||||
#define BUNIT_MMCONF_REG 0x27
|
#define BUNIT_MMCONF_REG 0x27
|
||||||
/* The SMMRR registers define the SMM region in MiB granularity. */
|
/* The SMMRR registers define the SMM region in MiB granularity. */
|
||||||
|
|
|
@ -244,7 +244,7 @@ void romstage_main_continue(EFI_STATUS status, void *hob_list_ptr)
|
||||||
late_mainboard_romstage_entry();
|
late_mainboard_romstage_entry();
|
||||||
post_code(0x4c);
|
post_code(0x4c);
|
||||||
|
|
||||||
/* if S3 resume skip ram check */
|
/* if S3 resume skip RAM check */
|
||||||
if (prev_sleep_state != ACPI_S3) {
|
if (prev_sleep_state != ACPI_S3) {
|
||||||
quick_ram_check();
|
quick_ram_check();
|
||||||
post_code(0x4d);
|
post_code(0x4d);
|
||||||
|
|
|
@ -31,7 +31,7 @@ static void pre_mp_init(void)
|
||||||
{
|
{
|
||||||
x86_mtrr_check();
|
x86_mtrr_check();
|
||||||
|
|
||||||
/* Enable the local cpu apics */
|
/* Enable the local CPU apics */
|
||||||
setup_lapic();
|
setup_lapic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
static unsigned long bus_freq_khz(void)
|
static unsigned long bus_freq_khz(void)
|
||||||
{
|
{
|
||||||
/* cpu freq = 400 MHz */
|
/* CPU freq = 400 MHz */
|
||||||
return 400 * 1000;
|
return 400 * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -352,7 +352,7 @@ static void cpu_core_init(device_t cpu)
|
||||||
/* Clear out pending MCEs */
|
/* Clear out pending MCEs */
|
||||||
configure_mca();
|
configure_mca();
|
||||||
|
|
||||||
/* Enable the local cpu apics */
|
/* Enable the local CPU apics */
|
||||||
enable_lapic_tpr();
|
enable_lapic_tpr();
|
||||||
setup_lapic();
|
setup_lapic();
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ int soc_skip_ucode_update(u32 current_patch_id, u32 new_patch_id)
|
||||||
* 0x08b with the Patch revision id one less than the id in the
|
* 0x08b with the Patch revision id one less than the id in the
|
||||||
* microcode binary. The PRMRR support is indicated in the MSR
|
* microcode binary. The PRMRR support is indicated in the MSR
|
||||||
* MTRRCAP[12]. Check for this feature and avoid reloading the
|
* MTRRCAP[12]. Check for this feature and avoid reloading the
|
||||||
* same microcode during cpu initialization.
|
* same microcode during CPU initialization.
|
||||||
*/
|
*/
|
||||||
msr = rdmsr(MTRR_CAP_MSR);
|
msr = rdmsr(MTRR_CAP_MSR);
|
||||||
return (msr.lo & PRMRR_SUPPORTED) && (current_patch_id == new_patch_id - 1);
|
return (msr.lo & PRMRR_SUPPORTED) && (current_patch_id == new_patch_id - 1);
|
||||||
|
|
|
@ -138,7 +138,7 @@ void smm_relocation_handler(int cpu, uintptr_t curr_smbase,
|
||||||
msr_t mtrr_cap;
|
msr_t mtrr_cap;
|
||||||
struct smm_relocation_params *relo_params = &smm_reloc_params;
|
struct smm_relocation_params *relo_params = &smm_reloc_params;
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "In relocation handler: cpu %d\n", cpu);
|
printk(BIOS_DEBUG, "In relocation handler: CPU %d\n", cpu);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determine if the processor supports saving state in MSRs. If so,
|
* Determine if the processor supports saving state in MSRs. If so,
|
||||||
|
|
|
@ -29,7 +29,7 @@ maskrom_param:
|
||||||
|
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
/*
|
/*
|
||||||
* Set the cpu to System mode with IRQ and FIQ disabled. Prefetch/Data
|
* Set the CPU to System mode with IRQ and FIQ disabled. Prefetch/Data
|
||||||
* aborts may happen early and crash before the abort handlers are
|
* aborts may happen early and crash before the abort handlers are
|
||||||
* installed, but at least the problem will show up near the code that
|
* installed, but at least the problem will show up near the code that
|
||||||
* causes it.
|
* causes it.
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
.arm
|
.arm
|
||||||
ENTRY(stage_entry)
|
ENTRY(stage_entry)
|
||||||
/*
|
/*
|
||||||
* Set the cpu to System mode with IRQ and FIQ disabled. Prefetch/Data
|
* Set the CPU to System mode with IRQ and FIQ disabled. Prefetch/Data
|
||||||
* aborts may happen early and crash before the abort handlers are
|
* aborts may happen early and crash before the abort handlers are
|
||||||
* installed, but at least the problem will show up near the code that
|
* installed, but at least the problem will show up near the code that
|
||||||
* causes it.
|
* causes it.
|
||||||
|
|
|
@ -34,7 +34,7 @@ static void run_next_stage(void *entry)
|
||||||
|
|
||||||
power_enable_and_ungate_cpu();
|
power_enable_and_ungate_cpu();
|
||||||
|
|
||||||
/* Repair ram on cluster0 and cluster1 after CPU is powered on. */
|
/* Repair RAM on cluster0 and cluster1 after CPU is powered on. */
|
||||||
ram_repair();
|
ram_repair();
|
||||||
|
|
||||||
clock_cpu0_remove_reset();
|
clock_cpu0_remove_reset();
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
/*
|
/*
|
||||||
* Set the cpu to System mode with IRQ and FIQ disabled. Prefetch/Data
|
* Set the CPU to System mode with IRQ and FIQ disabled. Prefetch/Data
|
||||||
* aborts may happen early and crash before the abort handlers are
|
* aborts may happen early and crash before the abort handlers are
|
||||||
* installed, but at least the problem will show up near the code that
|
* installed, but at least the problem will show up near the code that
|
||||||
* causes it.
|
* causes it.
|
||||||
|
|
|
@ -791,9 +791,9 @@ struct sdram_params {
|
||||||
uint32_t EmcCaTrainingTimingCntl2;
|
uint32_t EmcCaTrainingTimingCntl2;
|
||||||
/* Set if bit 6 select is greater than bit 7 select; uses aremc.spec packet SWIZZLE_BIT6_GT_BIT7 */
|
/* Set if bit 6 select is greater than bit 7 select; uses aremc.spec packet SWIZZLE_BIT6_GT_BIT7 */
|
||||||
uint32_t SwizzleRankByteEncode;
|
uint32_t SwizzleRankByteEncode;
|
||||||
/* Specifies enable and offset for patched boot rom write */
|
/* Specifies enable and offset for patched boot ROM write */
|
||||||
uint32_t BootRomPatchControl;
|
uint32_t BootRomPatchControl;
|
||||||
/* Specifies data for patched boot rom write */
|
/* Specifies data for patched boot ROM write */
|
||||||
uint32_t BootRomPatchData;
|
uint32_t BootRomPatchData;
|
||||||
/* Specifies the value for MC_MTS_CARVEOUT_BOM */
|
/* Specifies the value for MC_MTS_CARVEOUT_BOM */
|
||||||
uint32_t McMtsCarveoutBom;
|
uint32_t McMtsCarveoutBom;
|
||||||
|
|
|
@ -612,7 +612,7 @@ void lp0_resume(void)
|
||||||
|
|
||||||
power_on_main_cpu();
|
power_on_main_cpu();
|
||||||
|
|
||||||
// Perform ram repair after cpu is powered on.
|
// Perform RAM repair after CPU is powered on.
|
||||||
ram_repair();
|
ram_repair();
|
||||||
|
|
||||||
clear_cpu_resets();
|
clear_cpu_resets();
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
.arm
|
.arm
|
||||||
ENTRY(maincpu_setup)
|
ENTRY(maincpu_setup)
|
||||||
/*
|
/*
|
||||||
* Set the cpu to System mode with IRQ and FIQ disabled. Prefetch/Data
|
* Set the CPU to System mode with IRQ and FIQ disabled. Prefetch/Data
|
||||||
* aborts may happen early and crash before the abort handlers are
|
* aborts may happen early and crash before the abort handlers are
|
||||||
* installed, but at least the problem will show up near the code that
|
* installed, but at least the problem will show up near the code that
|
||||||
* causes it.
|
* causes it.
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
/*
|
/*
|
||||||
* Set the cpu to System mode with IRQ and FIQ disabled. Prefetch/Data
|
* Set the CPU to System mode with IRQ and FIQ disabled. Prefetch/Data
|
||||||
* aborts may happen early and crash before the abort handlers are
|
* aborts may happen early and crash before the abort handlers are
|
||||||
* installed, but at least the problem will show up near the code that
|
* installed, but at least the problem will show up near the code that
|
||||||
* causes it.
|
* causes it.
|
||||||
|
|
|
@ -133,14 +133,14 @@ static void request_ram_repair(void)
|
||||||
|
|
||||||
stopwatch_init(&sw);
|
stopwatch_init(&sw);
|
||||||
|
|
||||||
/* Perform cluster 0 ram repair */
|
/* Perform cluster 0 RAM repair */
|
||||||
reg = read32(&flow->ram_repair);
|
reg = read32(&flow->ram_repair);
|
||||||
reg |= req;
|
reg |= req;
|
||||||
write32(&flow->ram_repair, reg);
|
write32(&flow->ram_repair, reg);
|
||||||
while ((read32(&flow->ram_repair) & sts) != sts)
|
while ((read32(&flow->ram_repair) & sts) != sts)
|
||||||
;
|
;
|
||||||
|
|
||||||
/* Perform cluster 1 ram repair */
|
/* Perform cluster 1 RAM repair */
|
||||||
reg = read32(&flow->ram_repair_cluster1);
|
reg = read32(&flow->ram_repair_cluster1);
|
||||||
reg |= req;
|
reg |= req;
|
||||||
write32(&flow->ram_repair_cluster1, reg);
|
write32(&flow->ram_repair_cluster1, reg);
|
||||||
|
|
|
@ -508,7 +508,7 @@ void clock_cpu0_config(void)
|
||||||
/* wait and try again */
|
/* wait and try again */
|
||||||
if (timeout >= CLK_SWITCH_TIMEOUT_US) {
|
if (timeout >= CLK_SWITCH_TIMEOUT_US) {
|
||||||
printk(BIOS_ERR, "%s: PLLX programming timeout. "
|
printk(BIOS_ERR, "%s: PLLX programming timeout. "
|
||||||
"Switching cpu clock has falied.\n",
|
"Switching CPU clock has falied.\n",
|
||||||
__func__);
|
__func__);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -794,9 +794,9 @@ struct sdram_params {
|
||||||
/* Set if bit 6 select is greater than bit 7 select; uses aremc.
|
/* Set if bit 6 select is greater than bit 7 select; uses aremc.
|
||||||
spec packet SWIZZLE_BIT6_GT_BIT7 */
|
spec packet SWIZZLE_BIT6_GT_BIT7 */
|
||||||
uint32_t SwizzleRankByteEncode;
|
uint32_t SwizzleRankByteEncode;
|
||||||
/* Specifies enable and offset for patched boot rom write */
|
/* Specifies enable and offset for patched boot ROM write */
|
||||||
uint32_t BootRomPatchControl;
|
uint32_t BootRomPatchControl;
|
||||||
/* Specifies data for patched boot rom write */
|
/* Specifies data for patched boot ROM write */
|
||||||
uint32_t BootRomPatchData;
|
uint32_t BootRomPatchData;
|
||||||
/* Specifies the value for MC_MTS_CARVEOUT_BOM */
|
/* Specifies the value for MC_MTS_CARVEOUT_BOM */
|
||||||
uint32_t McMtsCarveoutBom;
|
uint32_t McMtsCarveoutBom;
|
||||||
|
|
|
@ -645,7 +645,7 @@ void lp0_resume(void)
|
||||||
|
|
||||||
power_on_main_cpu();
|
power_on_main_cpu();
|
||||||
|
|
||||||
// Perform ram repair after cpu is powered on.
|
// Perform RAM repair after CPU is powered on.
|
||||||
ram_repair();
|
ram_repair();
|
||||||
|
|
||||||
clear_cpu_resets();
|
clear_cpu_resets();
|
||||||
|
|
|
@ -72,7 +72,7 @@ void romstage(void)
|
||||||
cbmem_initialize_empty();
|
cbmem_initialize_empty();
|
||||||
|
|
||||||
ccplex_cpu_prepare();
|
ccplex_cpu_prepare();
|
||||||
printk(BIOS_INFO, "T132 romstage: cpu prepare done\n");
|
printk(BIOS_INFO, "T132 romstage: CPU prepare done\n");
|
||||||
|
|
||||||
ccplex_load_mts();
|
ccplex_load_mts();
|
||||||
printk(BIOS_INFO, "T132 romstage: MTS loading done\n");
|
printk(BIOS_INFO, "T132 romstage: MTS loading done\n");
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
/*
|
/*
|
||||||
* Set the cpu to System mode with IRQ and FIQ disabled. Prefetch/Data
|
* Set the CPU to System mode with IRQ and FIQ disabled. Prefetch/Data
|
||||||
* aborts may happen early and crash before the abort handlers are
|
* aborts may happen early and crash before the abort handlers are
|
||||||
* installed, but at least the problem will show up near the code that
|
* installed, but at least the problem will show up near the code that
|
||||||
* causes it.
|
* causes it.
|
||||||
|
|
|
@ -72,7 +72,7 @@ static void request_ram_repair(void)
|
||||||
|
|
||||||
stopwatch_init(&sw);
|
stopwatch_init(&sw);
|
||||||
|
|
||||||
/* Perform ram repair */
|
/* Perform RAM repair */
|
||||||
reg = read32(&flow->ram_repair);
|
reg = read32(&flow->ram_repair);
|
||||||
reg |= req;
|
reg |= req;
|
||||||
write32(&flow->ram_repair, reg);
|
write32(&flow->ram_repair, reg);
|
||||||
|
|
|
@ -951,9 +951,9 @@ struct sdram_params {
|
||||||
/* Set if bit 6 select is greater than bit 7 select; uses aremc.
|
/* Set if bit 6 select is greater than bit 7 select; uses aremc.
|
||||||
spec packet SWIZZLE_BIT6_GT_BIT7 */
|
spec packet SWIZZLE_BIT6_GT_BIT7 */
|
||||||
uint32_t SwizzleRankByteEncode;
|
uint32_t SwizzleRankByteEncode;
|
||||||
/* Specifies enable and offset for patched boot rom write */
|
/* Specifies enable and offset for patched boot ROM write */
|
||||||
uint32_t BootRomPatchControl;
|
uint32_t BootRomPatchControl;
|
||||||
/* Specifies data for patched boot rom write */
|
/* Specifies data for patched boot ROM write */
|
||||||
uint32_t BootRomPatchData;
|
uint32_t BootRomPatchData;
|
||||||
|
|
||||||
/* Specifies the value for MC_MTS_CARVEOUT_BOM */
|
/* Specifies the value for MC_MTS_CARVEOUT_BOM */
|
||||||
|
|
|
@ -1024,7 +1024,7 @@ void lp0_resume(void)
|
||||||
* 1 : MAX77621
|
* 1 : MAX77621
|
||||||
*/
|
*/
|
||||||
if (read32(pmc_scratch201_ptr) & PMIC_77621)
|
if (read32(pmc_scratch201_ptr) & PMIC_77621)
|
||||||
/* Set cpu rail 0.85V */
|
/* Set CPU rail 0.85V */
|
||||||
i2c_send(MAX77621_I2C_ADDR, MAX77621_VOUT_DATA);
|
i2c_send(MAX77621_I2C_ADDR, MAX77621_VOUT_DATA);
|
||||||
else
|
else
|
||||||
/* Enable GPIO5 on MAX77620 PMIC */
|
/* Enable GPIO5 on MAX77620 PMIC */
|
||||||
|
|
|
@ -79,7 +79,7 @@ void romstage(void)
|
||||||
cbmem_initialize_empty();
|
cbmem_initialize_empty();
|
||||||
|
|
||||||
ccplex_cpu_prepare();
|
ccplex_cpu_prepare();
|
||||||
printk(BIOS_INFO, "T210 romstage: cpu prepare done\n");
|
printk(BIOS_INFO, "T210 romstage: CPU prepare done\n");
|
||||||
|
|
||||||
romstage_mainboard_init();
|
romstage_mainboard_init();
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ static void low_power_start(void)
|
||||||
if (reg_val != RST_FLAG_VAL) {
|
if (reg_val != RST_FLAG_VAL) {
|
||||||
write32(VECTOR_LOW_POWER_FLAG, 0x0);
|
write32(VECTOR_LOW_POWER_FLAG, 0x0);
|
||||||
jump_bx(CORE_RESET_INIT_ADDRESS);
|
jump_bx(CORE_RESET_INIT_ADDRESS);
|
||||||
/* restart cpu execution and never returns. */
|
/* restart CPU execution and never returns. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Workaround for iROM EVT1. A7 core execution may flow into incorrect
|
/* Workaround for iROM EVT1. A7 core execution may flow into incorrect
|
||||||
|
@ -276,7 +276,7 @@ static void configure_secondary_cores(void)
|
||||||
* WFI state (in bootblock). The power_down_core will be more helpful
|
* WFI state (in bootblock). The power_down_core will be more helpful
|
||||||
* when we want to use SMP inside firmware. */
|
* when we want to use SMP inside firmware. */
|
||||||
|
|
||||||
/* Clear boot reg (hotplug address) in cpu states */
|
/* Clear boot reg (hotplug address) in CPU states */
|
||||||
write32((void *)&exynos_cpu_states->hotplug_address, 0);
|
write32((void *)&exynos_cpu_states->hotplug_address, 0);
|
||||||
|
|
||||||
/* set low_power flag and address */
|
/* set low_power flag and address */
|
||||||
|
|
Loading…
Add table
Reference in a new issue