libpayload: Save EAX and EBX only for multiboot payloads
When CONFIG_LP_MULTIBOOT is enabled, save the values of EAX and EBX passed from the bootloader. This information can be useful for multiboot payloads feature alone. Change-Id: I98c2cd00206ee48eb0fc67edd9533032bcf3e5eb Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82040 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Dinesh Gehlot <digehlot@google.com>
This commit is contained in:
@@ -63,9 +63,11 @@ _init:
|
|||||||
/* No interrupts, please. */
|
/* No interrupts, please. */
|
||||||
cli
|
cli
|
||||||
|
|
||||||
|
#if CONFIG(LP_MULTIBOOT)
|
||||||
/* Store EAX and EBX */
|
/* Store EAX and EBX */
|
||||||
movl %eax, loader_eax
|
movl %eax, loader_eax
|
||||||
movl %ebx, loader_ebx
|
movl %ebx, loader_ebx
|
||||||
|
#endif
|
||||||
|
|
||||||
/* save pointer to coreboot tables */
|
/* save pointer to coreboot tables */
|
||||||
movl 4(%esp), %eax
|
movl 4(%esp), %eax
|
||||||
|
@@ -30,9 +30,6 @@
|
|||||||
#include <libpayload.h>
|
#include <libpayload.h>
|
||||||
#include <arch/apic.h>
|
#include <arch/apic.h>
|
||||||
|
|
||||||
unsigned long loader_eax; /**< The value of EAX passed from the loader */
|
|
||||||
unsigned long loader_ebx; /**< The value of EBX passed from the loader */
|
|
||||||
|
|
||||||
int main_argc; /**< The argc value to pass to main() */
|
int main_argc; /**< The argc value to pass to main() */
|
||||||
|
|
||||||
/** The argv value to pass to main() */
|
/** The argv value to pass to main() */
|
||||||
|
@@ -30,8 +30,8 @@
|
|||||||
#include <libpayload.h>
|
#include <libpayload.h>
|
||||||
#include <multiboot_tables.h>
|
#include <multiboot_tables.h>
|
||||||
|
|
||||||
extern unsigned long loader_eax;
|
unsigned long loader_eax; /* The value of EAX passed from the loader */
|
||||||
extern unsigned long loader_ebx;
|
unsigned long loader_ebx; /* The value of EBX passed from the loader */
|
||||||
|
|
||||||
static int mb_add_memrange(struct sysinfo_t *info, unsigned long long base,
|
static int mb_add_memrange(struct sysinfo_t *info, unsigned long long base,
|
||||||
unsigned long long size, unsigned int type)
|
unsigned long long size, unsigned int type)
|
||||||
|
Reference in New Issue
Block a user