2020-03-04 15:10:45 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2015-09-05 20:31:14 +02:00
|
|
|
|
|
|
|
#include <memlayout.h>
|
|
|
|
#include <arch/header.ld>
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* It would be good to lay down RAMSTAGE, ROMSTAGE, etc consecutively
|
|
|
|
* like other architectures/chipsets it's not possible because of
|
|
|
|
* the linking games played during romstage creation by trying
|
|
|
|
* to find the final landing place in CBFS for XIP. Therefore,
|
|
|
|
* conditionalize with macros.
|
|
|
|
*/
|
|
|
|
#if ENV_RAMSTAGE
|
2020-07-02 20:48:38 +02:00
|
|
|
RAMSTAGE(CONFIG_RAMBASE, 8M)
|
2015-09-05 20:31:14 +02:00
|
|
|
|
|
|
|
#elif ENV_ROMSTAGE
|
2015-09-16 00:04:13 +02:00
|
|
|
/* The 1M size is not allocated. It's just for basic size checking.
|
|
|
|
* Link at 32MiB address and rely on cbfstool to relocate to XIP. */
|
2016-02-29 07:04:51 +01:00
|
|
|
ROMSTAGE(CONFIG_ROMSTAGE_ADDR, 1M)
|
2015-09-05 20:31:14 +02:00
|
|
|
|
2020-06-11 00:25:52 +02:00
|
|
|
#include "car.ld"
|
2020-04-22 01:03:53 +02:00
|
|
|
#elif ENV_SEPARATE_VERSTAGE
|
2015-09-29 23:31:20 +02:00
|
|
|
/* The 1M size is not allocated. It's just for basic size checking.
|
|
|
|
* Link at 32MiB address and rely on cbfstool to relocate to XIP. */
|
2016-02-29 07:04:51 +01:00
|
|
|
VERSTAGE(CONFIG_VERSTAGE_ADDR, 1M)
|
2015-09-29 23:31:20 +02:00
|
|
|
|
2020-06-11 00:25:52 +02:00
|
|
|
#include "car.ld"
|
2016-01-21 07:08:17 +01:00
|
|
|
#elif ENV_BOOTBLOCK
|
|
|
|
|
2020-06-11 00:25:52 +02:00
|
|
|
#include "car.ld"
|
2016-01-21 07:08:17 +01:00
|
|
|
|
2016-03-18 18:21:23 +01:00
|
|
|
#elif ENV_POSTCAR
|
|
|
|
POSTCAR(32M, 1M)
|
2015-09-05 20:31:14 +02:00
|
|
|
#endif
|
|
|
|
}
|
2016-01-21 07:08:17 +01:00
|
|
|
|
|
|
|
#if ENV_BOOTBLOCK
|
2020-04-21 09:29:17 +02:00
|
|
|
#include <arch/x86/bootblock.ld>
|
2016-01-21 07:08:17 +01:00
|
|
|
#endif /* ENV_BOOTBLOCK */
|