blob: 44ffa26939f73b4bb0e626a0f263fb1428b5fd8f [file] [log] [blame]
Ronald G. Minniche0e784a2014-11-26 19:25:47 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000012 */
13
14#include <cbmem.h>
Jonathan Neuschäferfc5e6c62016-11-24 08:25:29 +010015#include <commonlib/configstring.h>
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000016
17void *cbmem_top(void)
18{
Jonathan Neuschäferfc5e6c62016-11-24 08:25:29 +010019 uintptr_t base;
20 size_t size;
21
22 query_mem(configstring(), &base, &size);
23
24 return (void *)(base + size);
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000025}