Changeset 282f4724 in mainline


Ignore:
Timestamp:
2006-06-25T21:02:16Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ce8725be
Parents:
7431e867
Message:

Cleanup in the boot infrastructure.
This commit tries to separate generic stuff from mips32 specific stuff.
Other architectures will follow.

Files:
3 added
4 edited
2 moved

Legend:

Unmodified
Added
Removed
  • arch/mips32/loader/Makefile

    r7431e867 r282f4724  
    4848
    4949CFLAGS = -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mhard-float -mips3
    50 DEFS =
     50DEFS = -I.
    5151
    5252SOURCES = \
    5353        main.c \
    5454        msim.c \
    55         printf.c \
     55        ../../../generic/printf.c \
    5656        asm.S \
    5757        boot.S
  • arch/mips32/loader/main.c

    r7431e867 r282f4724  
    2828
    2929#include "main.h"
    30 #include "printf.h"
     30#include "../../../generic/printf.h"
    3131#include "msim.h"
    3232#include "asm.h"
  • arch/mips32/loader/msim.c

    r7431e867 r282f4724  
    2828 
    2929#include "msim.h"
    30 #include "printf.h"
    31 
     30#include "../../../generic/printf.h"
    3231
    3332#define MSIM_VIDEORAM            0xB0000000
    34 
    3533
    3634void write(const char *str, const int len)
  • arch/mips32/loader/msim.h

    r7431e867 r282f4724  
    3030#define __MSIM_H__
    3131
    32 #define NULL 0
    33 #define false 0
    34 #define true 1
    35 
    36 typedef __builtin_va_list va_list;
    37 
    38 #define va_start(ap, last)              __builtin_va_start(ap, last)
    39 #define va_arg(ap, type)                __builtin_va_arg(ap, type)
    40 #define va_end(ap)                      __builtin_va_end(ap)
    41 
    4232extern void init(void);
    4333extern void halt(void);
    4434
    45 extern void write(const char *str, const int len);
    4635extern void *translate(void *addr);
    4736
  • generic/printf.c

    r7431e867 r282f4724  
    2828
    2929#include "printf.h"
    30 #include "msim.h"
     30#include "stdarg.h"
     31#include <types.h>
     32
     33typedef char *char_ptr;
    3134
    3235static char digits[] = "0123456789abcdef";  /**< Hexadecimal characters */
    33 
    3436
    3537void puts(const char *str)
  • generic/printf.h

    r7431e867 r282f4724  
    2727 */
    2828
    29 #ifndef __PRINTF_H__
    30 #define __PRINTF_H__
     29#ifndef PRINTF_H__
     30#define PRINTF_H__
    3131
    3232#define INT8    1
     
    3535#define INT64   8
    3636
    37 typedef signed char __s8;
     37extern void puts(const char *str);
     38extern void printf(const char *fmt, ...);
    3839
    39 typedef unsigned char __u8;
    40 typedef unsigned short __u16;
    41 typedef unsigned int __u32;
    42 typedef unsigned long long __u64;
    43 
    44 typedef __u32 __address;
    45 typedef __u32 __native;
    46 
    47 typedef char *char_ptr;
    48 
    49 void puts(const char *str);
    50 void printf(const char *fmt, ...);
     40extern void write(const char *str, const int len);
    5141
    5242#endif
Note: See TracChangeset for help on using the changeset viewer.