static void prepare_romstage_ramstack(void *resume_backup_memory) { size_t backup_top = backup_size(); print_car_debug("Prepare CAR migration and stack regions..."); if (resume_backup_memory) { memcpy_(resume_backup_memory + HIGH_MEMORY_SAVE - backup_top, (void *)(CONFIG_RAMTOP - backup_top), backup_top); } memset_((void *)(CONFIG_RAMTOP - backup_top), 0, backup_top); print_car_debug(" Done\n"); }
static void prepare_ramstage_region(int s3resume) { size_t backup_top = backup_size(); print_car_debug("Prepare ramstage memory region..."); if (s3resume) { void *resume_backup_memory = acpi_backup_container(CONFIG_RAMBASE, HIGH_MEMORY_SAVE); if (resume_backup_memory) memcpy_(resume_backup_memory, (void *) CONFIG_RAMBASE, HIGH_MEMORY_SAVE - backup_top); } print_car_debug(" Done\n"); }
static void prepare_ramstage_region(void *resume_backup_memory) { size_t backup_top = backup_size(); print_car_debug("Prepare ramstage memory region..."); if (resume_backup_memory) { memcpy_(resume_backup_memory, (void *) CONFIG_RAMBASE, HIGH_MEMORY_SAVE - backup_top); memset_((void*) CONFIG_RAMBASE, 0, HIGH_MEMORY_SAVE - backup_top); } else { memset_((void*)0, 0, CONFIG_RAMTOP - backup_top); } #if IS_ENABLED(CONFIG_HAVE_ROMSTAGE_CONSOLE_SPINLOCK) initialize_romstage_console_lock(); #endif #if IS_ENABLED(CONFIG_HAVE_ROMSTAGE_NVRAM_CBFS_SPINLOCK) initialize_romstage_nvram_cbfs_lock(); #endif print_car_debug(" Done\n"); }