Ionela Voinescu | 00903e5 | 2015-01-09 13:14:20 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2014 Imagination Technologies |
Aaron Durbin | 6e76fff | 2015-03-20 09:42:05 -0500 | [diff] [blame] | 5 | * Copyright 2015 Google Inc. |
Ionela Voinescu | 00903e5 | 2015-01-09 13:14:20 +0000 | [diff] [blame] | 6 | * |
| 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 Voinescu | 00903e5 | 2015-01-09 13:14:20 +0000 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #include <program_loading.h> |
| 18 | |
| 19 | /* For each segment of a program loaded this function is called*/ |
Aaron Durbin | 096f457 | 2016-03-31 13:49:00 -0500 | [diff] [blame] | 20 | void 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 Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 26 | void __weak platform_segment_loaded(uintptr_t start, |
Aaron Durbin | 096f457 | 2016-03-31 13:49:00 -0500 | [diff] [blame] | 27 | size_t size, int flags) |
| 28 | { |
| 29 | /* do nothing */ |
| 30 | } |
| 31 | |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 32 | void __weak arch_segment_loaded(uintptr_t start, size_t size, |
Aaron Durbin | 6e76fff | 2015-03-20 09:42:05 -0500 | [diff] [blame] | 33 | int flags) |
Ionela Voinescu | 00903e5 | 2015-01-09 13:14:20 +0000 | [diff] [blame] | 34 | { |
| 35 | /* do nothing */ |
| 36 | } |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 37 | |
| 38 | void prog_run(struct prog *prog) |
| 39 | { |
| 40 | platform_prog_run(prog); |
| 41 | arch_prog_run(prog); |
| 42 | } |
| 43 | |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 44 | void __weak platform_prog_run(struct prog *prog) |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 45 | { |
| 46 | /* do nothing */ |
| 47 | } |