Changeset 577fe9b6 in mainline
- Timestamp:
- 2011-08-07T22:09:26Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 699f3bc
- Parents:
- 26fb118a
- Location:
- boot/arch/ia64
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/ia64/Makefile.inc
r26fb118a r577fe9b6 46 46 arch/$(BARCH)/src/main.c \ 47 47 arch/$(BARCH)/src/sal.c \ 48 arch/$(BARCH)/src/sal_asm.S \ 48 49 arch/$(BARCH)/src/putchar.c \ 49 50 $(COMPS_C) \ -
boot/arch/ia64/include/sal.h
r26fb118a r577fe9b6 32 32 #include <arch/types.h> 33 33 #include <typedefs.h> 34 35 /* 36 * Essential SAL procedures' IDs 37 */ 38 #define SAL_FREQ_BASE 0x1000012 34 39 35 40 typedef struct { … … 103 108 extern void sal_system_table_parse(sal_system_table_header_t *); 104 109 110 extern uint64_t sal_base_clock_frequency(void); 111 112 #define sal_call_1_1(id, arg1, ret1) \ 113 sal_call((id), (arg1), 0, 0, 0, 0, 0, 0, (ret1), NULL, NULL) 114 115 extern uint64_t sal_call(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, 116 uint64_t, uint64_t, uint64_t, uint64_t *, uint64_t *, uint64_t *); 117 105 118 #endif -
boot/arch/ia64/src/main.c
r26fb118a r577fe9b6 118 118 } 119 119 120 static void read_ sal_configuration(void)121 { 122 if (bootpar && bootpar->efi_system_table) {123 /* TODO: read the real value s from SAL */120 static void read_pal_configuration(void) 121 { 122 if (bootpar) { 123 /* TODO: read the real value from PAL */ 124 124 bootinfo.freq_scale = DEFAULT_FREQ_SCALE; 125 bootinfo.sys_freq = DEFAULT_SYS_FREQ;126 127 efi_guid_t sal_guid = SAL_SYSTEM_TABLE_GUID;128 sal_system_table_header_t *sal_st;129 130 sal_st = efi_vendor_table_find(131 (efi_system_table_t *) bootpar->efi_system_table, sal_guid);132 133 sal_system_table_parse(sal_st);134 125 } else { 135 126 /* Configure default values for simulators. */ 136 127 bootinfo.freq_scale = DEFAULT_FREQ_SCALE; 128 } 129 } 130 131 static void read_sal_configuration(void) 132 { 133 if (bootpar && bootpar->efi_system_table) { 134 efi_guid_t sal_guid = SAL_SYSTEM_TABLE_GUID; 135 sal_system_table_header_t *sal_st; 136 137 sal_st = efi_vendor_table_find( 138 (efi_system_table_t *) bootpar->efi_system_table, sal_guid); 139 140 sal_system_table_parse(sal_st); 141 142 bootinfo.sys_freq = sal_base_clock_frequency(); 143 } else { 144 /* Configure default values for simulators. */ 137 145 bootinfo.sys_freq = DEFAULT_SYS_FREQ; 138 146 } … … 198 206 read_efi_memmap(); 199 207 read_sal_configuration(); 208 read_pal_configuration(); 200 209 201 210 printf("Booting the kernel ...\n"); -
boot/arch/ia64/src/sal.c
r26fb118a r577fe9b6 30 30 #include <arch/types.h> 31 31 32 static sal_entrypoint_desc_t *sal_entrypoints;33 32 static sal_ap_wakeup_desc_t *sal_ap_wakeup; 33 34 uint64_t pal_proc = 0; 35 36 uint64_t sal_proc = 0; 37 uint64_t sal_proc_gp = 0; 34 38 35 39 void sal_system_table_parse(sal_system_table_header_t *sst) … … 41 45 switch ((sal_sst_type_t) *cur) { 42 46 case SSTT_ENTRYPOINT_DESC: 43 sal_entrypoints = (sal_entrypoint_desc_t *) cur; 47 pal_proc = ((sal_entrypoint_desc_t *) cur)->pal_proc; 48 sal_proc = ((sal_entrypoint_desc_t *) cur)->sal_proc; 49 sal_proc_gp = ((sal_entrypoint_desc_t *) cur)->sal_proc_gp; 44 50 cur += sizeof(sal_entrypoint_desc_t); 45 51 break; … … 66 72 } 67 73 74 uint64_t sal_base_clock_frequency(void) 75 { 76 uint64_t freq; 77 78 sal_call_1_1(SAL_FREQ_BASE, 0, &freq); 79 80 return freq; 81 }
Note:
See TracChangeset
for help on using the changeset viewer.