Changeset 4872160 in mainline for boot/arch/ppc32/src/ofw.c


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/arch/ppc32/src/ofw.c

    rbb252ca r4872160  
    2727 */
    2828
    29 #include <ofwarch.h>
    30 #include <ofw.h>
    31 #include <printf.h>
     29#include <genarch/ofw.h>
     30#include <typedefs.h>
     31#include <putchar.h>
     32#include <str.h>
    3233
    3334typedef int (*ofw_entry_t)(ofw_args_t *args);
    3435
    35 int ofw(ofw_args_t *args)
     36ofw_arg_t ofw(ofw_args_t *args)
    3637{
    3738        return ((ofw_entry_t) ofw_cif)(args);
    3839}
    3940
    40 void write(const char *str, const int len)
     41void putchar(const wchar_t ch)
    4142{
    42         int i;
     43        if (ch == '\n')
     44                ofw_putchar('\r');
    4345       
    44         for (i = 0; i < len; i++) {
    45                 if (str[i] == '\n')
    46                         ofw_write("\r", 1);
    47                 ofw_write(&str[i], 1);
    48         }
     46        if (ascii_check(ch))
     47                ofw_putchar(ch);
     48        else
     49                ofw_putchar(U_SPECIAL);
    4950}
    50 
    51 int ofw_translate_failed(ofw_arg_t flag)
    52 {
    53         /* PearPC returns buggy flag */
    54         return 0;
    55 }
Note: See TracChangeset for help on using the changeset viewer.