coreboot/src
Iru Cai 88eb167868 arch/x86: Save resume vector to stack in x86_64 mode
In x86_64, the first function parameter is passed in rdi register, and
the 32-bit code after exiting long mode reads the resume vector in
4(%esp), so it's needed to save the resume vector from rdi to 4(%rsp).

Also note that the function attribute "regparm" only works on x86-32
targets according to the GCC manual, so "asmlinkage" doesn't change
the ABI of an x86_64 function.

Tested on HP EliteBook 2560p. The laptop can resume from S3 in x86_64
mode after this change.

Change-Id: I45f2678071b2511c0af5dce9d9b73ac70dfd7252
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55947
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-07 14:54:56 +00:00
..
acpi ACPI: Refactor use of global and device NVS 2021-06-14 19:45:56 +00:00
arch arch/x86: Save resume vector to stack in x86_64 mode 2021-07-07 14:54:56 +00:00
commonlib timestamp,vc/google/chromeos/cr50: Add timestamp for enable update 2021-07-05 10:50:06 +00:00
console Asm code: Use NO_EARLY_BOOTBLOCK_POSTCODES to remove Asm port80s 2021-06-25 15:51:20 +00:00
cpu Makefile.inc: Fix IFITTOOL dependencies 2021-07-07 14:51:22 +00:00
device device: Reflow strings in printk statements 2021-07-05 10:52:19 +00:00
drivers drivers/intel/fsp2: Change FSPS returned message to INFO 2021-07-02 23:12:54 +00:00
ec ec/google: Use EC_HOST_EVENT_NONE 2021-06-30 04:57:16 +00:00
include arch/x86: Use ENV_X86_64 instead of _x86_64_ 2021-07-06 06:09:13 +00:00
lib selfboot: Add support for selfload in romstage 2021-07-02 00:47:23 +00:00
mainboard mb/google/zork/var/shuboz: adjust telemetry settings 2021-07-07 09:27:14 +00:00
northbridge nb/intel/x4x: Expose x86_64 support 2021-07-06 06:09:48 +00:00
security Makefile.inc: Fix IFITTOOL dependencies 2021-07-07 14:51:22 +00:00
soc soc/mediatek/mt8195: Add dramc_param.h 2021-07-07 14:47:42 +00:00
southbridge sb/intel/i82801gx: Prepare for x86_64 2021-07-05 10:49:12 +00:00
superio src: Retype option API to use unsigned integers 2021-05-06 14:48:15 +00:00
vendorcode vc/mediatek/mt8195: Enable VREF calibration at DDR3200 for S0 stability 2021-07-07 14:49:34 +00:00
Kconfig option: Allow mainboards to implement the API 2021-05-28 11:37:25 +00:00