blob: 2641ac6d05e309d59fed6e6c7185475f3a6fa81b [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
Aaron Durbin64031672018-04-21 14:45:32 -060026void __weak platform_segment_loaded(uintptr_t start,
Aaron Durbin096f4572016-03-31 13:49:00 -050027 size_t size, int flags)
28{
29 /* do nothing */
30}
31
Aaron Durbin64031672018-04-21 14:45:32 -060032void __weak arch_segment_loaded(uintptr_t start, size_t size,
Aaron Durbin6e76fff2015-03-20 09:42:05 -050033 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
Aaron Durbin64031672018-04-21 14:45:32 -060044void __weak platform_prog_run(struct prog *prog)
Aaron Durbinb3847e62015-03-20 15:55:08 -050045{
46 /* do nothing */
47}