Furquan Shaikh | da01d94 | 2014-03-19 14:31:23 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Deepa Dinamani | 1c2748d | 2015-01-12 11:57:09 -0800 | [diff] [blame^] | 4 | * Copyright (c) 2015, The Linux Foundation. All rights reserved. |
Furquan Shaikh | da01d94 | 2014-03-19 14:31:23 -0700 | [diff] [blame] | 5 | * Copyright 2014 Google Inc. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ |
| 20 | |
Vadim Bendebury | 15c98b0 | 2014-05-01 14:45:56 -0700 | [diff] [blame] | 21 | #include <cbmem.h> |
Furquan Shaikh | da01d94 | 2014-03-19 14:31:23 -0700 | [diff] [blame] | 22 | #include <console/console.h> |
Aaron Durbin | e4f3e7a | 2015-03-17 13:25:19 -0500 | [diff] [blame] | 23 | #include <program_loading.h> |
Vadim Bendebury | ef77f87 | 2014-12-10 20:42:58 -0800 | [diff] [blame] | 24 | #include <soc/soc_services.h> |
Deepa Dinamani | 1c2748d | 2015-01-12 11:57:09 -0800 | [diff] [blame^] | 25 | #include "mmu.h" |
Furquan Shaikh | da01d94 | 2014-03-19 14:31:23 -0700 | [diff] [blame] | 26 | |
| 27 | void main(void) |
| 28 | { |
Vadim Bendebury | 1ea5685 | 2014-05-13 17:11:30 -0700 | [diff] [blame] | 29 | console_init(); |
Vadim Bendebury | ef77f87 | 2014-12-10 20:42:58 -0800 | [diff] [blame] | 30 | initialize_dram(); |
Deepa Dinamani | 1c2748d | 2015-01-12 11:57:09 -0800 | [diff] [blame^] | 31 | |
| 32 | /* Add dram mappings to mmu tables. */ |
| 33 | setup_dram_mappings(DRAM_INITIALIZED); |
| 34 | |
Vadim Bendebury | 2396226 | 2014-12-11 15:17:48 -0800 | [diff] [blame] | 35 | cbmem_initialize_empty(); |
Aaron Durbin | e4f3e7a | 2015-03-17 13:25:19 -0500 | [diff] [blame] | 36 | run_ramstage(); |
Furquan Shaikh | da01d94 | 2014-03-19 14:31:23 -0700 | [diff] [blame] | 37 | } |