40cb3fe94d
The prefix POSTCODE makes it clear that the macro is a post code. Hence, replace related macros starting with POST to POSTCODE and also replace every instance the macros are invoked with the new name. The files was changed by running the following bash script from the top level directory. sed -i'' '30,${s/#define POST/#define POSTCODE/g;}' \ src/commonlib/include/commonlib/console/post_codes.h; myArray=`grep -e "^#define POSTCODE_" \ src/commonlib/include/commonlib/console/post_codes.h | \ grep -v "POST_CODES_H" | tr '\t' ' ' | cut -d ' ' -f 2`; for str in ${myArray[@]}; do splitstr=`echo $str | cut -d '_' -f2-` grep -r POST_$splitstr src | \ cut -d ':' -f 1 | xargs sed -i'' -e "s/POST_$splitstr/$str/g"; grep -r "POST_$splitstr" util/cbfstool | \ cut -d ':' -f 1 | xargs sed -i'' -e "s/POST_$splitstr/$str/g"; done Change-Id: I25db79fa15f032c08678f66d86c10c928b7de9b8 Signed-off-by: lilacious <yuchenhe126@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76043 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
34 lines
797 B
C
34 lines
797 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
#include <console/console.h>
|
|
#include <string.h>
|
|
#include <acpi/acpi.h>
|
|
#include <arch/cpu.h>
|
|
#include <commonlib/helpers.h>
|
|
#include <fallback.h>
|
|
#include <timestamp.h>
|
|
|
|
#define WAKEUP_BASE 0x600
|
|
|
|
asmlinkage void (*acpi_do_wakeup)(uintptr_t vector) = (void *)WAKEUP_BASE;
|
|
|
|
extern unsigned char __wakeup;
|
|
extern unsigned int __wakeup_size;
|
|
|
|
void __noreturn acpi_resume(void *wake_vec)
|
|
{
|
|
/* Call mainboard resume handler first, if defined. */
|
|
mainboard_suspend_resume();
|
|
|
|
/* Copy wakeup trampoline in place. */
|
|
memcpy((void *)WAKEUP_BASE, &__wakeup, __wakeup_size);
|
|
|
|
set_boot_successful();
|
|
|
|
timestamp_add_now(TS_ACPI_WAKE_JUMP);
|
|
|
|
post_code(POSTCODE_OS_RESUME);
|
|
acpi_do_wakeup((uintptr_t)wake_vec);
|
|
|
|
die("Failed the jump to wakeup vector\n");
|
|
}
|