summaryrefslogtreecommitdiffstats
path: root/src/cpu/amd/car/post_cache_as_ram.c
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2010-03-11 22:12:10 +0000
committerMyles Watson <mylesgw@gmail.com>2010-03-11 22:12:10 +0000
commitf326e3a4fef3081e4baf8f85d5cc63d91e8c7676 (patch)
treee542da112cf8a31e2ee3b276c83c73fa4e10b8fa /src/cpu/amd/car/post_cache_as_ram.c
parented15220b87d298088a074747b24e212c23333e33 (diff)
downloadcoreboot-staging-f326e3a4fef3081e4baf8f85d5cc63d91e8c7676.zip
coreboot-staging-f326e3a4fef3081e4baf8f85d5cc63d91e8c7676.tar.gz
Replace spaces with tabs. Trivial.
Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5202 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/cpu/amd/car/post_cache_as_ram.c')
-rw-r--r--src/cpu/amd/car/post_cache_as_ram.c64
1 files changed, 31 insertions, 33 deletions
diff --git a/src/cpu/amd/car/post_cache_as_ram.c b/src/cpu/amd/car/post_cache_as_ram.c
index 10194b9..8ce49aa 100644
--- a/src/cpu/amd/car/post_cache_as_ram.c
+++ b/src/cpu/amd/car/post_cache_as_ram.c
@@ -5,7 +5,7 @@
static inline void print_debug_pcar(const char *strval, uint32_t val)
{
- printk_debug("%s%08x\r\n", strval, val);
+ printk_debug("%s%08x\r\n", strval, val);
}
/* from linux kernel 2.6.32 asm/string_32.h */
@@ -41,15 +41,15 @@ static void post_cache_as_ram(void)
{
#if 1
- {
- /* Check value of esp to verify if we have enough rom for stack in Cache as RAM */
- unsigned v_esp;
- __asm__ volatile (
- "movl %%esp, %0\n\t"
- : "=a" (v_esp)
- );
- print_debug_pcar("v_esp=", v_esp);
- }
+ {
+ /* Check value of esp to verify if we have enough rom for stack in Cache as RAM */
+ unsigned v_esp;
+ __asm__ volatile (
+ "movl %%esp, %0\n\t"
+ : "=a" (v_esp)
+ );
+ print_debug_pcar("v_esp=", v_esp);
+ }
#endif
unsigned testx = 0x5a5a5a5a;
@@ -59,7 +59,7 @@ static void post_cache_as_ram(void)
ram need to set CONFIG_RAMTOP to 2M and use var mtrr instead.
*/
#if CONFIG_RAMTOP <= 0x100000
- #error "You need to set CONFIG_RAMTOP greater than 1M"
+ #error "You need to set CONFIG_RAMTOP greater than 1M"
#endif
/* So we can access RAM from [1M, CONFIG_RAMTOP) */
@@ -71,51 +71,49 @@ static void post_cache_as_ram(void)
/* from here don't store more data in CAR */
vErrata343();
- memcopy((void *)((CONFIG_RAMTOP)-CONFIG_DCACHE_RAM_SIZE), (void *)CONFIG_DCACHE_RAM_BASE, CONFIG_DCACHE_RAM_SIZE); //inline
-// dump_mem((CONFIG_RAMTOP) - 0x8000, (CONFIG_RAMTOP) - 0x7c00);
+ memcopy((void *)((CONFIG_RAMTOP)-CONFIG_DCACHE_RAM_SIZE), (void *)CONFIG_DCACHE_RAM_BASE, CONFIG_DCACHE_RAM_SIZE); //inline
+// dump_mem((CONFIG_RAMTOP) - 0x8000, (CONFIG_RAMTOP) - 0x7c00);
- __asm__ volatile (
- /* set new esp */ /* before CONFIG_RAMBASE */
- "subl %0, %%esp\n\t"
- ::"a"( (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE)- (CONFIG_RAMTOP) )
+ __asm__ volatile (
+ /* set new esp */ /* before CONFIG_RAMBASE */
+ "subl %0, %%esp\n\t"
+ ::"a"( (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE)- (CONFIG_RAMTOP) )
/* discard all registers (eax is used for %0), so gcc redo everything
after the stack is moved */
: "cc", "memory", "%ebx", "%ecx", "%edx", "%esi", "%edi", "%ebp"
- );
+ );
/* We can put data to stack again */
- /* only global variable sysinfo in cache need to be offset */
- print_debug("Done\r\n");
- print_debug_pcar("testx = ", testx);
+ /* only global variable sysinfo in cache need to be offset */
+ print_debug("Done\r\n");
+ print_debug_pcar("testx = ", testx);
print_debug("Disabling cache as ram now \r\n");
disable_cache_as_ram_bsp();
- print_debug("Clearing initial memory region: ");
+ print_debug("Clearing initial memory region: ");
#if CONFIG_HAVE_ACPI_RESUME == 1
/* clear only coreboot used region of memory. Note: this may break ECC enabled boards */
memset((void*) CONFIG_RAMBASE, (CONFIG_RAMTOP) - CONFIG_RAMBASE - CONFIG_DCACHE_RAM_SIZE, 0);
#else
- memset((void*)0, ((CONFIG_RAMTOP) - CONFIG_DCACHE_RAM_SIZE), 0);
+ memset((void*)0, ((CONFIG_RAMTOP) - CONFIG_DCACHE_RAM_SIZE), 0);
#endif
- print_debug("Done\r\n");
+ print_debug("Done\r\n");
// dump_mem((CONFIG_RAMTOP) - 0x8000, (CONFIG_RAMTOP) - 0x7c00);
- set_sysinfo_in_ram(1); // So other core0 could start to train mem
+ set_sysinfo_in_ram(1); // So other core0 could start to train mem
#if CONFIG_MEM_TRAIN_SEQ == 1
// struct sys_info *sysinfox = ((CONFIG_RAMTOP) - CONFIG_DCACHE_RAM_GLOBAL_VAR_SIZE);
- // wait for ap memory to trained
-// wait_all_core0_mem_trained(sysinfox); // moved to lapic_init_cpus.c
+ // wait for ap memory to trained
+// wait_all_core0_mem_trained(sysinfox); // moved to lapic_init_cpus.c
#endif
- /*copy and execute coreboot_ram */
- copy_and_run();
- /* We will not return */
-
- print_debug("should not be here -\r\n");
+ /*copy and execute coreboot_ram */
+ copy_and_run();
+ /* We will not return */
+ print_debug("should not be here -\r\n");
}
-
OpenPOWER on IntegriCloud