diff options
author | Gabe Black <gabeblack@google.com> | 2011-10-01 04:27:32 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-03-29 23:19:13 +0200 |
commit | 19e7e7d2e7cb4ff0ae821448355ec8b14e0bd2bf (patch) | |
tree | 11d9084a2c1b1712fe94d5e8b6d20dd1096080ec /src/include/cpu | |
parent | 4d04a715475a60f627ddeded3385ca04d883a55b (diff) |
Add infrastructure for global data in the CAR phase of boot
The cbmem console structure and car global data are put in their own section,
with the cbmem console coming after the global data. These areas are linked
to be where CAR is available and at the very bottom of the stack.
There is one shortcoming of this change:
The section created by this change needs to be stripped out by the Makefile
since leaving it in confuses cbfstool when it installs the stage in the image.
I would like to make the tools link those symbols at the right location but
leave allocation of that space out of the ELF.
Change-Id: Iccfb99b128d59c5b7d6164796d21ba46d2a674e0
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/727
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/include/cpu')
-rw-r--r-- | src/include/cpu/x86/car.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/cpu/x86/car.h b/src/include/cpu/x86/car.h new file mode 100644 index 0000000000..2d2af03a37 --- /dev/null +++ b/src/include/cpu/x86/car.h @@ -0,0 +1,31 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA + */ + +#ifndef CPU_X86_CAR_H +#define CPU_X86_CAR_H + +#ifdef __PRE_RAM__ +#define CAR_GLOBAL __attribute__((section(".car.global_data,\"w\",@nobits#"))) +#define CAR_CBMEM __attribute__((section(".car.cbmem_console,\"w\",@nobits#"))) +#else +#define CAR_GLOBAL +#define CAR_CBMEM +#endif + +#endif |