coreboot/src
Patrick Rudolph 3052e9e642 cpu/x86/64bit/mode_switch2: The reverse function to mode_switch
Add another mode_switch assembly function to call x86_64 code from
x86_32 code. This is particullary useful for BLOBs like mrc.bin or
FSP that calls back into coreboot.

The user must first wrap all functions that are to be called from
x86_32 using the macro prot2lm_wrapper. Instead of using the original
function the wrapped functions must be passed to the x86_32 BLOBs.

The assembly code assume that 0-3 32bit arguments are passed to
the wrapped function.

Tested:
- Called x86_64 code from x86_32 code in qemu.
- Booted Lenovo X220 using x86_32 MRC using x86_64 console.

Change-Id: Ib625233e5f673eae9f3dcb2d03004c06bb07b149
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79753
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-01-05 14:33:22 +00:00
..
acpi x86: Separate CPU and SoC physical address size 2023-12-22 12:26:59 +00:00
arch cpu/x86/64bit/mode_switch: Simplify assembly code 2024-01-03 00:38:27 +00:00
commonlib commonlib/bsd: Tag CBMEM IDs deprecated for crashlog 2023-12-20 04:29:25 +00:00
console Allow to build romstage sources inside the bootblock 2023-11-09 13:20:18 +00:00
cpu cpu/x86/64bit/mode_switch2: The reverse function to mode_switch 2024-01-05 14:33:22 +00:00
device x86: Separate CPU and SoC physical address size 2023-12-22 12:26:59 +00:00
drivers driver/wifi: DDR RFIM _DSM method function 3 report incorrect value 2024-01-04 14:22:24 +00:00
ec treewide: Use show_notices target for warnings 2023-12-20 04:06:55 +00:00
include sb/intel/bd82x6x: Add defines for PCI IDs 2023-12-23 19:58:44 +00:00
lib src/lib: Add memory/time saving special case for ramstage caching 2023-12-18 08:13:12 +00:00
mainboard soc/amd/picasso/acpi: move SoC-common code from dsdt.asl to soc.asl 2024-01-04 14:16:48 +00:00
northbridge nb/intel/sandybridge/raminit: Honor SPD's dll_off_mode 2024-01-04 14:20:06 +00:00
sbom sbom/Makefile.inc: Change GOPATH 2023-11-20 14:32:54 +00:00
security vboot: Add firmware PCR support 2024-01-04 14:30:33 +00:00
soc soc/amd/picasso/acpi: move SoC-common code from dsdt.asl to soc.asl 2024-01-04 14:16:48 +00:00
southbridge sb/intel/bd82x6x/pch: Add method to identify PCH 2023-12-26 17:03:56 +00:00
superio sio/nuvoton/npcd378: Fix ACPI errors 2023-12-16 22:58:35 +00:00
vendorcode vendorcode/google/chromeos: Use unsigned int for "factory_config" 2024-01-05 09:24:01 +00:00
Kconfig Allow to build romstage sources inside the bootblock 2023-11-09 13:20:18 +00:00