-#if _RAMBASE >= 0x100000
- extern char _secondary_start[];
- extern char _secondary_start_end[];
- unsigned long code_size;
- unsigned long start_eip;
-
- /* _secondary_start need to be masked 20 above bit, because 16 bit code in secondary.S
- Also We need to copy the _secondary_start to the below 1M region
- */
- start_eip = get_valid_start_eip((unsigned long)_secondary_start);
- code_size = (unsigned long)_secondary_start_end - (unsigned long)_secondary_start;
-
- /* copy the _secondary_start to the ram below 1M*/
- memcpy((unsigned char *)start_eip, (unsigned char *)_secondary_start, code_size);
-
- printk_debug("start_eip=0x%08lx, offset=0x%08lx, code_size=0x%08lx\n", start_eip, ((unsigned long)_secondary_start - start_eip), code_size);
+ extern char _secondary_start_end[];
+ unsigned long code_size;
+ unsigned long start_eip;
+
+ /* _secondary_start need to be masked 20 above bit, because 16 bit code in secondary.S
+ Also We need to copy the _secondary_start to the below 1M region
+ */
+ start_eip = get_valid_start_eip((unsigned long)_secondary_start);
+ code_size = (unsigned long)_secondary_start_end - (unsigned long)_secondary_start;
+
+#if CONFIG_HAVE_ACPI_RESUME == 1
+ /* need to save it for RAM resume */
+ lowmem_backup_size = code_size;
+ lowmem_backup = malloc(code_size);
+ lowmem_backup_ptr = (char *)start_eip;
+
+ if (lowmem_backup == NULL)
+ die("Out of backup memory\n");
+
+ memcpy(lowmem_backup, lowmem_backup_ptr, lowmem_backup_size);