1 /************************************************************************ 2 * 3 * Copyright (c) 2013-2015 Intel Corporation. 4 * 5 * This program and the accompanying materials 6 * are licensed and made available under the terms and conditions of the BSD License 7 * which accompanies this distribution. The full text of the license may be found at 8 * http://opensource.org/licenses/bsd-license.php 9 * 10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 * 13 ************************************************************************/ 14 #include "mrc.h" 15 #include "memory_options.h" 16 17 #include "meminit.h" 18 #include "meminit_utils.h" 19 #include "prememinit.h" 20 #include "io.h" 21 22 // Base address for UART registers 23 extern uint32_t UartMmioBase; 24 25 // 26 // Memory Reference Code entry point when executing from BIOS 27 // Mrc(MRCParams_t * mrc_params)28void Mrc( MRCParams_t *mrc_params) 29 { 30 // configure uart base address assuming code relocated to eSRAM 31 UartMmioBase = mrc_params->uart_mmio_base; 32 33 ENTERFN(); 34 35 DPF(D_INFO, "MRC Version %04X %s %s\n", MRC_VERSION, __DATE__, __TIME__); 36 37 // this will set up the data structures used by MemInit() 38 PreMemInit(mrc_params); 39 40 // this will initialize system memory 41 MemInit(mrc_params); 42 43 LEAVEFN(); 44 return; 45 } 46 47