Changeset 4872160 in mainline for boot/genarch/include/division.h


Ignore:
Timestamp:
2010-05-04T10:44:55Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
568db0f
Parents:
bb252ca
Message:

new boot infrastructure

  • more code and metadata unification
  • import of up-to-date implementations from the kernel
  • the boot loaders should behave more similarly on all platforms
  • support for deflate compressed (LZ77) boot components
    • this again allows feasible boot images to be created on mips32
  • IA64 is still not booting
    • the broken forked GNU EFI library has been removed, a replacement of the functionality is on its way
File:
1 moved

Legend:

Unmodified
Added
Removed
  • boot/genarch/include/division.h

    rbb252ca r4872160  
    11/*
    2  * Copyright (c) 2007 Michal Kebrt
    3  * Copyright (c) 2009 Vineeth Pillai
     2 * Copyright (c) 2006 Josef Cejka
    43 * All rights reserved.
    54 *
     
    2827 */
    2928
     29/** @file
     30 */
    3031
    31 /** @addtogroup arm32boot
    32  * @{
    33  */
    34 /** @file
    35  *  @brief bootloader output logic
    36  */
     32#ifndef BOOT_DIVISION_H_
     33#define BOOT_DIVISION_H_
    3734
     35/* 32bit integer division */
     36extern int __divsi3(int, int);
    3837
    39 #include <printf.h>
     38/* 64bit integer division */
     39extern long long __divdi3(long long, long long);
    4040
     41/* 32bit unsigned integer division */
     42extern unsigned int __udivsi3(unsigned int, unsigned int);
    4143
    42 /** Address where characters to be printed are expected. */
    43 #ifdef MACHINE_testarm
    44         #define PUTC_ADDRESS  0x10000000
     44/* 64bit unsigned integer division */
     45extern unsigned long long __udivdi3(unsigned long long, unsigned long long);
     46
     47/* 32bit remainder of the signed division */
     48extern int __modsi3(int, int);
     49
     50/* 64bit remainder of the signed division */
     51extern long long __moddi3(long long, long long);
     52
     53/* 32bit remainder of the unsigned division */
     54extern unsigned int __umodsi3(unsigned int, unsigned int);
     55
     56/* 64bit remainder of the unsigned division */
     57extern unsigned long long __umoddi3(unsigned long long, unsigned long long);
     58
     59extern unsigned long long __udivmoddi3(unsigned long long, unsigned long long,
     60    unsigned long long *);
     61
    4562#endif
    46 
    47 #ifdef MACHINE_integratorcp
    48         #define PUTC_ADDRESS  0x16000000
    49 #endif
    50 
    51 
    52 
    53 /** Prints a character to the console.
    54  *
    55  * @param ch Character to be printed.
    56  */
    57 static void putc(char ch)
    58 {
    59         if (ch == '\n')
    60                 *((volatile char *) PUTC_ADDRESS) = '\r';
    61         *((volatile char *) PUTC_ADDRESS) = ch;
    62 }
    63 
    64 
    65 /** Prints a string to the console.
    66  *
    67  * @param str String to be printed.
    68  * @param len Number of characters to be printed.
    69  */
    70 void write(const char *str, const int len)
    71 {
    72         int i;
    73         for (i = 0; i < len; ++i) {
    74                 putc(str[i]);
    75         }
    76 }
    7763
    7864/** @}
    7965 */
    80 
Note: See TracChangeset for help on using the changeset viewer.