Changeset 7da160b in mainline
- Timestamp:
- 2010-02-23T21:42:05Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b905002
- Parents:
- 68acf21
- Location:
- kernel/arch/sparc64
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/sun4v/hypercall.h
r68acf21 r7da160b 75 75 76 76 /* return codes */ 77 #define EOK0 /**< Successful return */78 #define ENOCPU 1 /**< Invalid CPU id */79 #define ENORADDR2 /**< Invalid real address */80 #define ENOINTR 3 /**< Invalid interrupt id */81 #define EBADPGSZ4 /**< Invalid pagesize encoding */82 #define EBADTSB 5 /**< Invalid TSB description */83 #define HV_EINVAL 6 /**< Invalid argument */84 #define EBADTRAP7 /**< Invalid function number */85 #define EBADALIGN8 /**< Invalid address alignment */86 #define EWOULDBLOCK9 /**< Cannot complete operation without blocking */87 #define ENOACCESS10 /**< No access to specified resource */88 #define EIO11 /**< I/O Error */89 #define ECPUERROR12 /**< CPU is in error state */90 #define ENOTSUPPORTED 13 /**< Function not supported */91 #define ENOMAP 14 /**< No mapping found */92 #define ETOOMANY15 /**< Too many items specified / limit reached */93 #define ECHANNEL16 /**< Invalid LDC channel */94 #define HV_EBUSY 17 /**< Operation failed as resource is otherwise busy */77 #define HV_EOK 0 /**< Successful return */ 78 #define HV_ENOCPU 1 /**< Invalid CPU id */ 79 #define HV_ENORADDR 2 /**< Invalid real address */ 80 #define HV_ENOINTR 3 /**< Invalid interrupt id */ 81 #define HV_EBADPGSZ 4 /**< Invalid pagesize encoding */ 82 #define HV_EBADTSB 5 /**< Invalid TSB description */ 83 #define HV_EINVAL 6 /**< Invalid argument */ 84 #define HV_EBADTRAP 7 /**< Invalid function number */ 85 #define HV_EBADALIGN 8 /**< Invalid address alignment */ 86 #define HV_EWOULDBLOCK 9 /**< Cannot complete operation without blocking */ 87 #define HV_ENOACCESS 10 /**< No access to specified resource */ 88 #define HV_EIO 11 /**< I/O Error */ 89 #define HV_ECPUERROR 12 /**< CPU is in error state */ 90 #define HV_ENOTSUPPORTED 13 /**< Function not supported */ 91 #define HV_ENOMAP 14 /**< No mapping found */ 92 #define HV_ETOOMANY 15 /**< Too many items specified / limit reached */ 93 #define HV_ECHANNEL 16 /**< Invalid LDC channel */ 94 #define HV_EBUSY 17 /**< Operation failed as resource is otherwise busy */ 95 95 96 96 -
kernel/arch/sparc64/src/drivers/niagara.c
r68acf21 r7da160b 104 104 static inline void do_putchar(const char c) { 105 105 /* repeat until the buffer is non-full */ 106 while (__hypercall_fast1(CONS_PUTCHAR, c) == EWOULDBLOCK)106 while (__hypercall_fast1(CONS_PUTCHAR, c) == HV_EWOULDBLOCK) 107 107 ; 108 108 } … … 139 139 140 140 /* read character from keyboard, send it to upper layers of HelenOS */ 141 if (__hypercall_fast_ret1(0, 0, 0, 0, 0, CONS_GETCHAR, &c) == EOK) {141 if (__hypercall_fast_ret1(0, 0, 0, 0, 0, CONS_GETCHAR, &c) == HV_EOK) { 142 142 if (!silent) { 143 143 /* kconsole active, send the character to kernel */ -
kernel/arch/sparc64/src/mm/sun4v/tlb.c
r68acf21 r7da160b 406 406 uint64_t errno = __hypercall_fast3(MMU_DEMAP_ALL, 0, 0, 407 407 MMU_FLAG_DTLB | MMU_FLAG_ITLB); 408 if (errno != EOK) {408 if (errno != HV_EOK) { 409 409 panic("Error code = %d.\n", errno); 410 410 } -
kernel/arch/sparc64/src/sun4v/md.c
r68acf21 r7da160b 104 104 static md_element_t *get_element(element_idx_t idx) 105 105 { 106 return (md_element_t *) ( 107 mach_desc +sizeof(md_header_t) + idx * sizeof(md_element_t));106 return (md_element_t *) (mach_desc + 107 sizeof(md_header_t) + idx * sizeof(md_element_t)); 108 108 } 109 109 … … 114 114 uintptr_t name_offset = get_element(idx)->name_offset; 115 115 return (char *) mach_desc + sizeof(md_header_t) + 116 116 md_header->node_blk_sz + name_offset; 117 117 } 118 118 … … 137 137 md_element_t *element = get_element(idx); 138 138 if (element->tag == PROP_VAL && 139 139 str_cmp(key, get_element_name(idx)) == 0) { 140 140 *result = element->d.val; 141 141 return true; … … 161 161 md_element_t *element = get_element(idx); 162 162 if (element->tag == PROP_DATA && 163 163 str_cmp(key, get_element_name(idx)) == 0) { 164 164 *result = (char *) mach_desc + sizeof(md_header_t) + 165 166 165 md_header->node_blk_sz + md_header->name_blk_sz + 166 element->d.y.data_offset; 167 167 return true; 168 168 } … … 186 186 md_element_t *element = get_element(*it); 187 187 if (element->tag == PROP_ARC && 188 188 str_cmp("fwd", get_element_name(*it)) == 0) { 189 189 return true; 190 190 } … … 289 289 290 290 if (element->tag == NODE && 291 291 str_cmp(name, get_element_name(*node)) == 0) { 292 292 return true; 293 293 } … … 306 306 { 307 307 uint64_t retval = __hypercall_fast2(MACH_DESC, KA2PA(mach_desc), 308 308 MD_MAX_SIZE); 309 309 310 310 retval = retval; 311 if (retval != EOK) {311 if (retval != HV_EOK) { 312 312 printf("Could not retrieve machine description, error = %d.\n", 313 313 retval); 314 314 } 315 315 } -
kernel/arch/sparc64/src/trap/sun4v/interrupt.c
r68acf21 r7da160b 86 86 CPU_MONDO_QUEUE_ID, 87 87 KA2PA(cpu_mondo_queues[CPU->id]), 88 CPU_MONDO_NENTRIES) != EOK)88 CPU_MONDO_NENTRIES) != HV_EOK) 89 89 panic("Initializing mondo queue failed on CPU %d.\n", 90 90 CPU->arch.id);
Note:
See TracChangeset
for help on using the changeset viewer.