Aaron Durbin | 6b0cebc | 2016-09-16 16:15:14 -0500 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2016 Google, Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | */ |
| 15 | |
Aaron Durbin | 1e9a914 | 2016-09-16 16:23:21 -0500 | [diff] [blame^] | 16 | #include <cbmem.h> |
Aaron Durbin | 6b0cebc | 2016-09-16 16:15:14 -0500 | [diff] [blame] | 17 | #include <console/console.h> |
| 18 | #include <main_decl.h> |
| 19 | #include <program_loading.h> |
| 20 | #include <soc/intel/common/util.h> |
| 21 | |
| 22 | void main(void) |
| 23 | { |
| 24 | console_init(); |
| 25 | |
Aaron Durbin | 1e9a914 | 2016-09-16 16:23:21 -0500 | [diff] [blame^] | 26 | /* Recover cbmem so infrastruture using it is functional. */ |
| 27 | cbmem_initialize(); |
| 28 | |
Aaron Durbin | 6b0cebc | 2016-09-16 16:15:14 -0500 | [diff] [blame] | 29 | /* Display the MTRRs */ |
| 30 | if (IS_ENABLED(CONFIG_DISPLAY_MTRRS)) |
| 31 | soc_display_mtrrs(); |
| 32 | |
| 33 | /* Load and run ramstage. */ |
| 34 | run_ramstage(); |
| 35 | } |