Changeset c47e1a8 in mainline for uspace/app/sbi/src/bigint.h


Ignore:
Timestamp:
2010-05-21T07:50:04Z (16 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
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.
Message:

merge mainline changes (rev. 451)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/sbi/src/bigint.h

    rcf8cc36 rc47e1a8  
    11/*
    2  * Copyright (c) 2006 Martin Decky
     2 * Copyright (c) 2010 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 #ifndef BOOT_ppc32_ASM_H_
    30 #define BOOT_ppc32_ASM_H_
     29#ifndef BIGINT_H_
     30#define BIGINT_H_
    3131
    32 #define PAGE_WIDTH  12
    33 #define PAGE_SIZE   (1 << PAGE_WIDTH)
     32#include "mytypes.h"
    3433
    35 #define TRANS_SIZE   1024
    36 #define BOOT_OFFSET  0x8000
     34void bigint_init(bigint_t *bigint, int value);
     35void bigint_shallow_copy(bigint_t *src, bigint_t *dest);
     36void bigint_clone(bigint_t *src, bigint_t *dest);
     37void bigint_reverse_sign(bigint_t *src, bigint_t *dest);
     38void bigint_destroy(bigint_t *bigint);
    3739
    38 #define BALLOC_MAX_SIZE  (128 * 1024)
     40int bigint_get_value_int(bigint_t *bigint, int *dval);
     41bool_t bigint_is_zero(bigint_t *bigint);
     42bool_t bigint_is_negative(bigint_t *bigint);
    3943
    40 #ifndef __ASM__
     44void bigint_div_digit(bigint_t *a, bigint_word_t b, bigint_t *quot,
     45    bigint_word_t *rem);
    4146
    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)
     47void bigint_add(bigint_t *a, bigint_t *b, bigint_t *dest);
     48void bigint_sub(bigint_t *a, bigint_t *b, bigint_t *dest);
     49void bigint_mul(bigint_t *a, bigint_t *b, bigint_t *dest);
     50void bigint_print(bigint_t *bigint);
    5951
    6052#endif
    61 
    62 #endif
Note: See TracChangeset for help on using the changeset viewer.