Rev 3159 | Rev 3171 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3159 | Rev 3160 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | */ |
31 | */ |
32 | /** @file |
32 | /** @file |
33 | * @brief Program Control Block interface. |
33 | * @brief Program Control Block interface. |
34 | */ |
34 | */ |
35 | 35 | ||
36 | #ifndef ILOADER_PCB_H_ |
36 | #ifndef LIBC_PCB_H_ |
37 | #define ILOADER_PCB_H_ |
37 | #define LIBC_PCB_H_ |
38 | 38 | ||
39 | #include <sys/types.h> |
39 | #include <sys/types.h> |
40 | #include <arch/pcb.h> |
- | |
41 | 40 | ||
42 | typedef void (*entry_point_t)(void); |
41 | typedef void (*entry_point_t)(void); |
43 | 42 | ||
44 | /** |
43 | /** |
45 | * Holds pointers to data passed from the program loader to the program |
44 | * Holds pointers to data passed from the program loader to the program |
46 | * and/or to the dynamic linker. This includes the program entry point, |
45 | * and/or to the dynamic linker. This includes the program entry point, |
47 | * arguments, environment etc. |
46 | * arguments, environment variables etc. |
48 | */ |
47 | */ |
49 | typedef struct { |
48 | typedef struct { |
50 | /** Program entry point */ |
49 | /** Program entry point */ |
51 | entry_point_t entry; |
50 | entry_point_t entry; |
52 | 51 | ||
53 | /* |
52 | /* |
54 | * ELF-specific data |
53 | * ELF-specific data |
55 | */ |
54 | */ |
56 | /** Pointer to ELF dynamic section of the program */ |
55 | /** Pointer to ELF dynamic section of the program */ |
57 | void *dynamic; |
56 | void *dynamic; |
58 | /** Pointer to dynamic section of the runtime linker */ |
57 | /** Pointer to dynamic section of the runtime linker */ |
59 | void *rtld_dynamic; |
58 | void *rtld_dynamic; |
60 | /** Runtime-linker load bias */ |
59 | /** Runtime-linker load bias */ |
61 | uintptr_t rtld_bias; |
60 | uintptr_t rtld_bias; |
62 | } pcb_t; |
61 | } pcb_t; |
63 | 62 | ||
- | 63 | // FIXME |
|
- | 64 | #define PCB_ADDRESS 0x6fff0000 |
|
- | 65 | ||
64 | static inline pcb_t *__pcb_get(void) { |
66 | static inline pcb_t *__pcb_get(void) { |
65 | return (pcb_t *)PCB_ADDRESS; |
67 | return (pcb_t *)PCB_ADDRESS; |
66 | } |
68 | } |
67 | 69 | ||
68 | #endif |
70 | #endif |