Changeset 8ff0bd2 in mainline for boot/arch/ia64/src/sal.c
- Timestamp:
- 2011-09-04T11:30:58Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 03bc76a
- Parents:
- d2c67e7 (diff), deac215e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/ia64/src/sal.c
rd2c67e7 r8ff0bd2 1 1 /* 2 * Copyright (c) 20 06Jakub Jermar2 * Copyright (c) 2011 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 #i fndef KERN_FHC_H_30 # define KERN_FHC_H_29 #include <arch/sal.h> 30 #include <arch/types.h> 31 31 32 #include <genarch/ofw/ofw_tree.h> 33 #include <typedefs.h> 34 #include <ddi/irq.h> 35 #include <typedefs.h> 32 static sal_ap_wakeup_desc_t *sal_ap_wakeup; 36 33 37 typedef struct { 38 uint64_t addr; 39 uint32_t size; 40 } __attribute__ ((packed)) ofw_fhc_reg_t; 34 extern uint64_t pal_proc; 41 35 42 typedef struct { 43 uint64_t child_base; 44 uint64_t parent_base; 45 uint32_t size; 46 } __attribute__ ((packed)) ofw_fhc_range_t; 36 uint64_t sal_proc = 0; 37 uint64_t sal_proc_gp = 0; 47 38 48 typedef struct { 49 uint64_t addr; 50 uint 32_t size;51 } __attribute__ ((packed)) ofw_central_reg_t;39 void sal_system_table_parse(sal_system_table_header_t *sst) 40 { 41 uint8_t *cur = (uint8_t *) &sst[1]; 42 uint16_t entry; 52 43 53 typedef struct { 54 uint64_t child_base; 55 uint64_t parent_base; 56 uint32_t size; 57 } __attribute__ ((packed)) ofw_central_range_t; 44 for (entry = 0; entry < sst->entry_count; entry++) { 45 switch ((sal_sst_type_t) *cur) { 46 case SSTT_ENTRYPOINT_DESC: 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; 50 cur += sizeof(sal_entrypoint_desc_t); 51 break; 52 case SSTT_MEMORY_DESC: 53 cur += sizeof(sal_memory_desc_t); 54 break; 55 case SSTT_PLATFORM_FEATURES_DESC: 56 cur += sizeof(sal_platform_features_desc_t); 57 break; 58 case SSTT_TR_DESC: 59 cur += sizeof(sal_tr_desc_t); 60 break; 61 case SSTT_PTC_COHERENCE_DOMAIN_DESC: 62 cur += sizeof(sal_ptc_coherence_domain_desc_t); 63 break; 64 case SSTT_AP_WAKEUP_DESC: 65 sal_ap_wakeup = (sal_ap_wakeup_desc_t *) cur; 66 cur += sizeof(sal_ap_wakeup_desc_t); 67 break; 68 default: 69 return; 70 } 71 } 72 } 58 73 59 extern bool ofw_fhc_apply_ranges(ofw_tree_node_t *, ofw_fhc_reg_t *, 60 uintptr_t *); 61 extern bool ofw_central_apply_ranges(ofw_tree_node_t *, ofw_central_reg_t *, 62 uintptr_t *); 63 64 extern bool ofw_fhc_map_interrupt(ofw_tree_node_t *, ofw_fhc_reg_t *, 65 uint32_t, int *, cir_t *, void **); 66 67 #endif 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.