Changeset 4872160 in mainline for boot/arch/ppc32/include


Ignore:
Timestamp:
2010-05-04T10:44:55Z (15 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
Location:
boot/arch/ppc32/include
Files:
1 added
5 moved

Legend:

Unmodified
Added
Removed
  • boot/arch/ppc32/include/arch.h

    rbb252ca r4872160  
    11/*
    22 * Copyright (c) 2006 Martin Decky
    3  * Copyright (c) 2006 Jakub Jermar
    43 * All rights reserved.
    54 *
     
    2827 */
    2928
    30 #ifndef BOOT_ia64_ASM_H_
    31 #define BOOT_ia64_ASM_H_
     29#ifndef BOOT_ppc32_ARCH_H_
     30#define BOOT_ppc32_ARCH_H_
    3231
    33 #include "types.h"
    34 #include "main.h"
    35 
    36 #define PAGE_WIDTH  14
     32#define PAGE_WIDTH  12
    3733#define PAGE_SIZE   (1 << PAGE_WIDTH)
    3834
    39 #define BALLOC_MAX_SIZE  (128 * 1024)
     35#define BOOT_OFFSET  0x8000
    4036
    41 extern void halt(void);
    42 extern void jump_to_kernel(void *) __attribute__((noreturn));
     37#define LOADER_ADDRESS  0x01000000
    4338
     39#ifndef __ASM__
     40        #define PA2KA(addr)  (((uintptr_t) (addr)) + 0x80000000)
     41#else
     42        #define PA2KA(addr)  ((addr) + 0x80000000)
     43#endif
    4444
    4545#endif
  • boot/arch/ppc32/include/asm.h

    rbb252ca r4872160  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28  
    29 #include "msim.h"
    30 #include <printf.h>
    3128
    32 #define MSIM_VIDEORAM            0xB0000000
     29#ifndef BOOT_ppc32_ASM_H_
     30#define BOOT_ppc32_ASM_H_
    3331
    34 void write(const char *str, const int len)
    35 {
    36         int i;
    37        
    38         for (i = 0; i < len; i++)
    39                 *((char *) MSIM_VIDEORAM) = str[i];
    40 }
     32#include <typedefs.h>
     33#include <arch/main.h>
     34
     35extern void jump_to_kernel(void *, void *, size_t, void *)
     36    __attribute__((noreturn));
     37extern void real_mode();
     38
     39#endif
  • boot/arch/ppc32/include/regname.h

    rbb252ca r4872160  
    2727 */
    2828
    29 #ifndef __ppc32_REGNAME_H__
    30 #define __ppc32_REGNAME_H__
     29#ifndef BOOT_ppc32_REGNAME_H_
     30#define BOOT_ppc32_REGNAME_H_
    3131
    3232/* Condition Register Bit Fields */
  • boot/arch/ppc32/include/types.h

    rbb252ca r4872160  
    3030#define BOOT_ppc32_TYPES_H_
    3131
    32 #include <gentypes.h>
     32#define TASKMAP_MAX_RECORDS        32
     33#define BOOTINFO_TASK_NAME_BUFLEN  32
    3334
    34 typedef signed char int8_t;
    35 
    36 typedef unsigned char uint8_t;
    37 typedef unsigned short uint16_t;
    38 typedef unsigned int uint32_t;
    39 typedef unsigned long long uint64_t;
    40 
     35typedef uint32_t size_t;
    4136typedef uint32_t uintptr_t;
    4237typedef uint32_t unative_t;
     38typedef int32_t native_t;
     39
     40typedef struct {
     41        void *addr;
     42        size_t size;
     43        char name[BOOTINFO_TASK_NAME_BUFLEN];
     44} task_t;
     45
     46typedef struct {
     47        size_t cnt;
     48        task_t tasks[TASKMAP_MAX_RECORDS];
     49} taskmap_t;
    4350
    4451#endif
Note: See TracChangeset for help on using the changeset viewer.