2015-07-31 11:10:40 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright 2015 MediaTek Inc.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <cbmem.h>
|
|
|
|
#include <stddef.h>
|
2015-08-06 08:07:50 +02:00
|
|
|
#include <stdlib.h>
|
2015-07-31 11:10:40 +02:00
|
|
|
#include <symbols.h>
|
2016-02-04 10:26:48 +01:00
|
|
|
#include <soc/emi.h>
|
2015-07-31 11:10:40 +02:00
|
|
|
|
|
|
|
void *cbmem_top(void)
|
|
|
|
{
|
2016-02-04 10:26:48 +01:00
|
|
|
return (void *)min((uintptr_t)_dram + sdram_size(), (uintptr_t)4 * GiB);
|
2015-07-31 11:10:40 +02:00
|
|
|
}
|