soc: Remove copyright notices
[coreboot.git] / src / soc / intel / quark / memmap.c
blobb2726d739e4f5c121a7c80c5d75e70dd296c0c16
1 /*
2 * This file is part of the coreboot project.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 #include <arch/romstage.h>
16 #include <cbmem.h>
17 #include <soc/reg_access.h>
19 void fill_postcar_frame(struct postcar_frame *pcf)
21 uintptr_t top_of_ram;
22 uintptr_t top_of_low_usable_memory;
24 /* Locate the top of RAM */
25 top_of_low_usable_memory = (uintptr_t) cbmem_top();
26 top_of_ram = ALIGN(top_of_low_usable_memory, 16 * MiB);
28 /* Cache postcar and ramstage */
29 postcar_frame_add_mtrr(pcf, top_of_ram - (16 * MiB), 16 * MiB,
30 MTRR_TYPE_WRBACK);
32 /* Cache RMU area */
33 postcar_frame_add_mtrr(pcf, (uintptr_t) top_of_low_usable_memory,
34 0x10000, MTRR_TYPE_WRTHROUGH);
36 /* Cache ESRAM */
37 postcar_frame_add_mtrr(pcf, 0x80000000, 0x80000, MTRR_TYPE_WRBACK);
39 pcf->skip_common_mtrr = 1;
40 /* Cache SPI flash - Write protect not supported */
41 postcar_frame_add_romcache(pcf, MTRR_TYPE_WRTHROUGH);