blob: 4b52a519bd32290f738020a8dd350bc905d65614 [file] [log] [blame]
Gabe Blackd40be112013-10-09 23:45:07 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2013 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.
Gabe Blackd40be112013-10-09 23:45:07 -070014 */
15
16#include <cbmem.h>
Tom Warren64982c502014-01-23 13:37:50 -070017#include <soc/display.h>
Julius Wernerf0d21ff32014-10-20 13:24:14 -070018#include <soc/sdram.h>
Gabe Blackd40be112013-10-09 23:45:07 -070019
20void *cbmem_top(void)
21{
Gabe Black5cbbc702014-02-08 05:17:38 -080022 return (void *)((sdram_max_addressable_mb() - FB_SIZE_MB) << 20UL);
Gabe Blackd40be112013-10-09 23:45:07 -070023}