blob: bc889fceae51fa6bb480f10884eab9e4f30efa69 [file] [log] [blame]
Ionela Voinescu00903e52015-01-09 13:14:20 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2014 Imagination Technologies
Aaron Durbin6e76fff2015-03-20 09:42:05 -05005 * Copyright 2015 Google Inc.
Ionela Voinescu00903e52015-01-09 13:14:20 +00006 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Ionela Voinescu00903e52015-01-09 13:14:20 +000015 */
16
17#include <program_loading.h>
18
19/* For each segment of a program loaded this function is called*/
Aaron Durbin096f4572016-03-31 13:49:00 -050020void prog_segment_loaded(uintptr_t start, size_t size, int flags)
21{
22 platform_segment_loaded(start, size, flags);
23 arch_segment_loaded(start, size, flags);
24}
25
26void __attribute__ ((weak)) platform_segment_loaded(uintptr_t start,
27 size_t size, int flags)
28{
29 /* do nothing */
30}
31
Aaron Durbin6e76fff2015-03-20 09:42:05 -050032void __attribute__ ((weak)) arch_segment_loaded(uintptr_t start, size_t size,
33 int flags)
Ionela Voinescu00903e52015-01-09 13:14:20 +000034{
35 /* do nothing */
36}
Aaron Durbinb3847e62015-03-20 15:55:08 -050037
38void prog_run(struct prog *prog)
39{
40 platform_prog_run(prog);
41 arch_prog_run(prog);
42}
43
44void __attribute__ ((weak)) platform_prog_run(struct prog *prog)
45{
46 /* do nothing */
47}