Changeset c47e1a8 in mainline for uspace/app/sbi/src/bigint.h
- Timestamp:
- 2010-05-21T07:50:04Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d51ee2b
- Parents:
- cf8cc36 (diff), 15b592b (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/sbi/src/bigint.h (moved) (moved from boot/arch/ppc32/loader/asm.h ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sbi/src/bigint.h
rcf8cc36 rc47e1a8 1 1 /* 2 * Copyright (c) 20 06 Martin Decky2 * Copyright (c) 2010 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 #ifndef B OOT_ppc32_ASM_H_30 #define B OOT_ppc32_ASM_H_29 #ifndef BIGINT_H_ 30 #define BIGINT_H_ 31 31 32 #define PAGE_WIDTH 12 33 #define PAGE_SIZE (1 << PAGE_WIDTH) 32 #include "mytypes.h" 34 33 35 #define TRANS_SIZE 1024 36 #define BOOT_OFFSET 0x8000 34 void bigint_init(bigint_t *bigint, int value); 35 void bigint_shallow_copy(bigint_t *src, bigint_t *dest); 36 void bigint_clone(bigint_t *src, bigint_t *dest); 37 void bigint_reverse_sign(bigint_t *src, bigint_t *dest); 38 void bigint_destroy(bigint_t *bigint); 37 39 38 #define BALLOC_MAX_SIZE (128 * 1024) 40 int bigint_get_value_int(bigint_t *bigint, int *dval); 41 bool_t bigint_is_zero(bigint_t *bigint); 42 bool_t bigint_is_negative(bigint_t *bigint); 39 43 40 #ifndef __ASM__ 44 void bigint_div_digit(bigint_t *a, bigint_word_t b, bigint_t *quot, 45 bigint_word_t *rem); 41 46 42 #include "types.h" 43 #include "main.h" 44 #include "ofwarch.h" 45 46 #define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) 47 48 extern uint8_t balloc_base[BALLOC_MAX_SIZE]; 49 extern uintptr_t trans[TRANS_SIZE]; 50 51 extern void halt(); 52 extern void jump_to_kernel(void *bootinfo, unsigned int bootinfo_size, 53 uintptr_t trans[], unsigned int kernel_size, void *real_mode) __attribute__((noreturn)); 54 extern void real_mode(); 55 56 #else 57 58 #define PA2KA(x) ((x) + 0x80000000) 47 void bigint_add(bigint_t *a, bigint_t *b, bigint_t *dest); 48 void bigint_sub(bigint_t *a, bigint_t *b, bigint_t *dest); 49 void bigint_mul(bigint_t *a, bigint_t *b, bigint_t *dest); 50 void bigint_print(bigint_t *bigint); 59 51 60 52 #endif 61 62 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
