libspe2  0.9a
elf_loader.h
Go to the documentation of this file.
1 /*
2  * libspe2 - A wrapper library to adapt the JSRE SPE usage model to SPUFS
3  * Copyright (C) 2005 IBM Corp.
4  *
5  * This library is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation; either version 2.1 of the License,
8  * or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13  * License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software Foundation,
17  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19 
20 #include "spebase.h"
21 #include <elf.h>
22 
23 #define LS_SIZE 0x40000 /* 256K (in bytes) */
24 
25 #define SPE_LDR_PROG_start (LS_SIZE - 512) // location of spe_ld.so prog
26 #define SPE_LDR_PARAMS_start (LS_SIZE - 128) // location of spe_ldr_params
27 
28 typedef union
29 {
30  unsigned long long ull;
31  unsigned int ui[2];
32 } addr64;
33 
35 {
36  unsigned int entry;
37 };
38 
39 /*
40  * Global API : */
41 
43 
44 int _base_spe_load_spe_elf (spe_program_handle_t *handle, void *ld_buffer,
45  struct spe_ld_info *ld_info);
46 
48  uint64_t *addr, uint32_t *size);
49 
51 
int _base_spe_load_spe_elf(spe_program_handle_t *handle, void *ld_buffer, struct spe_ld_info *ld_info)
Definition: elf_loader.c:201
int _base_spe_verify_spe_elf_image(spe_program_handle_t *handle)
Definition: elf_loader.c:99
unsigned long long ull
Definition: elf_loader.h:30
unsigned int entry
Definition: elf_loader.h:36
int _base_spe_toe_ear(spe_program_handle_t *speh)
Definition: elf_loader.c:354
int _base_spe_parse_isolated_elf(spe_program_handle_t *handle, uint64_t *addr, uint32_t *size)
Definition: elf_loader.c:111