Changeset 46c20c8 in mainline for uspace/app/top/top.h
- Timestamp:
- 2010-11-26T20:08:10Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45df59a
- Parents:
- fb150d78 (diff), ffdd2b9 (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
-
uspace/app/top/top.h (moved) (moved from boot/arch/sparc64/loader/main.h ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/top/top.h
rfb150d78 r46c20c8 1 1 /* 2 * Copyright (c) 2005 Martin Decky 2 * Copyright (c) 2010 Stanislav Kozina 3 * Copyright (c) 2010 Martin Decky 3 4 * All rights reserved. 4 5 * … … 27 28 */ 28 29 29 #ifndef BOOT_sparc64_MAIN_H_ 30 #define BOOT_sparc64_MAIN_H_ 30 /** @addtogroup top 31 * @{ 32 */ 31 33 32 #include <ofw.h> 33 #include <ofw_tree.h> 34 #include <balloc.h> 35 #include <types.h> 34 #ifndef TOP_TOP_H_ 35 #define TOP_TOP_H_ 36 36 37 #define KERNEL_VIRTUAL_ADDRESS 0x400000 37 #include <task.h> 38 #include <stats.h> 39 #include <time.h> 38 40 39 #define TASKMAP_MAX_RECORDS 32 41 #define FRACTION_TO_FLOAT(float, a, b) \ 42 do { \ 43 if ((b) != 0) { \ 44 (float).upper = (a); \ 45 (float).lower = (b); \ 46 } else { \ 47 (float).upper = 0; \ 48 (float).lower = 1; \ 49 } \ 50 } while (0) 40 51 41 /** Size of buffer for storing task name in task_t. */ 42 #define BOOTINFO_TASK_NAME_BUFLEN 32 52 typedef enum { 53 OP_TASKS, 54 OP_IPC, 55 OP_EXCS, 56 OP_HELP 57 } op_mode_t; 43 58 44 #define BSP_PROCESSOR 1 45 #define AP_PROCESSOR 0 59 typedef enum { 60 SORT_TASK_CYCLES 61 } sort_mode_t; 46 62 47 #define SUBARCH_US 1 48 #define SUBARCH_US3 3 63 extern op_mode_t op_mode; 64 extern sort_mode_t sort_mode; 65 extern bool excs_all; 49 66 50 67 typedef struct { 51 void *addr; 52 uint32_t size; 53 char name[BOOTINFO_TASK_NAME_BUFLEN]; 54 } task_t; 68 uint64_t upper; 69 uint64_t lower; 70 } fixed_float; 55 71 56 72 typedef struct { 57 uint32_t count;58 task_t tasks[TASKMAP_MAX_RECORDS];59 } taskmap_t;73 fixed_float idle; 74 fixed_float busy; 75 } perc_cpu_t; 60 76 61 77 typedef struct { 62 uintptr_t physmem_start; 63 taskmap_t taskmap; 64 memmap_t memmap; 65 ballocs_t ballocs; 66 ofw_tree_node_t *ofw_root; 67 } bootinfo_t; 78 fixed_float virtmem; 79 fixed_float ucycles; 80 fixed_float kcycles; 81 } perc_task_t; 68 82 69 extern uint32_t silo_ramdisk_image; 70 extern uint32_t silo_ramdisk_size; 83 typedef struct { 84 fixed_float cycles; 85 fixed_float count; 86 } perc_exc_t; 71 87 72 extern void start(void); 73 extern void bootstrap(void); 88 typedef struct { 89 time_t hours; 90 time_t minutes; 91 time_t seconds; 92 93 sysarg_t udays; 94 sysarg_t uhours; 95 sysarg_t uminutes; 96 sysarg_t useconds; 97 98 size_t load_count; 99 load_t *load; 100 101 size_t cpus_count; 102 stats_cpu_t *cpus; 103 perc_cpu_t *cpus_perc; 104 105 size_t tasks_count; 106 stats_task_t *tasks; 107 perc_task_t *tasks_perc; 108 size_t *tasks_map; 109 110 size_t threads_count; 111 stats_thread_t *threads; 112 113 size_t exceptions_count; 114 stats_exc_t *exceptions; 115 perc_exc_t *exceptions_perc; 116 117 stats_physmem_t *physmem; 118 119 uint64_t *ucycles_diff; 120 uint64_t *kcycles_diff; 121 uint64_t *ecycles_diff; 122 uint64_t *ecount_diff; 123 } data_t; 74 124 75 125 #endif 126 127 /** 128 * @} 129 */
Note:
See TracChangeset
for help on using the changeset viewer.
