Changeset f817d3a in mainline for boot


Ignore:
Timestamp:
2009-01-29T17:24:35Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
43d6401
Parents:
26c67a8
Message:

use macio optionally

Location:
boot
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/ppc32/loader/main.c

    r26c67a8 rf817d3a  
    9090static void version_print(void)
    9191{
    92         printf("HelenOS PPC32 Bootloader\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n", release, revision, timestamp);
     92        printf("HelenOS PPC32 Bootloader\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n\n", release, revision, timestamp);
    9393}
    9494
     
    108108       
    109109        if (!ofw_memmap(&bootinfo.memmap)) {
    110                 printf("Error: unable to get memory map, halting.\n");
     110                printf("Error: Unable to get memory map, halting.\n");
    111111                halt();
    112112        }
    113113       
    114114        if (bootinfo.memmap.total == 0) {
    115                 printf("Error: no memory detected, halting.\n");
     115                printf("Error: No memory detected, halting.\n");
    116116                halt();
    117117        }
    118118       
    119119        if (!ofw_screen(&bootinfo.screen))
    120                 printf("Warning: unable to get screen properties.\n");
     120                printf("Warning: Unable to get screen properties.\n");
    121121       
    122         if (!ofw_keyboard(&bootinfo.keyboard))
    123                 printf("Warning: unable to get keyboard properties.\n");
     122        if (!ofw_macio(&bootinfo.macio))
     123                printf("Warning: Unable to get macio properties.\n");
    124124       
    125         printf("\nDevice statistics\n");
    126         printf(" screen at %L, resolution %dx%d, %d bpp (scanline %d bytes)\n", bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline);
    127         printf(" keyboard at %L (size %d bytes)\n", bootinfo.keyboard.addr, bootinfo.keyboard.size);
     125        printf("Device statistics\n");
     126       
     127        if (bootinfo.screen.addr)
     128                printf(" screen at %L, resolution %dx%d, %d bpp (scanline %d bytes)\n", bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline);
     129       
     130        if (bootinfo.macio.addr)
     131                printf(" macio at %L (size %d bytes)\n", bootinfo.macio.addr, bootinfo.macio.size);
    128132       
    129133        void *real_mode_pa = ofw_translate(&real_mode);
  • boot/arch/ppc32/loader/main.h

    r26c67a8 rf817d3a  
    4848        taskmap_t taskmap;
    4949        screen_t screen;
    50         keyboard_t keyboard;
     50        macio_t macio;
    5151} bootinfo_t;
    5252
  • boot/arch/ppc32/loader/ofwarch.c

    r26c67a8 rf817d3a  
    4949}
    5050
    51 int ofw_keyboard(keyboard_t *keyboard)
     51int ofw_macio(macio_t *macio)
    5252{
    5353        char device_name[BUF_SIZE];
     
    5555        if (ofw_get_property(ofw_aliases, "macio", device_name, sizeof(device_name)) <= 0)
    5656                return false;
    57                                
     57       
    5858        phandle device = ofw_find_device(device_name);
    5959        if (device == -1)
    6060                return false;
    61                                                                
    62         pci_reg_t macio;
    63         if (ofw_get_property(device, "assigned-addresses", &macio, sizeof(macio)) <= 0)
     61       
     62        pci_reg_t pci_reg;
     63        if (ofw_get_property(device, "assigned-addresses", &pci_reg, sizeof(pci_reg)) <= 0)
    6464                return false;
    65         keyboard->addr = (void *) macio.addr.addr_lo;
    66         keyboard->size = macio.size_lo;
     65       
     66        macio->addr = (void *) pci_reg.addr.addr_lo;
     67        macio->size = pci_reg.size_lo;
    6768
    6869        return true;
  • boot/genarch/ofw.h

    r26c67a8 rf817d3a  
    7575        void *addr;
    7676        uint32_t size;
    77 } keyboard_t;
     77} macio_t;
    7878
    7979typedef struct {
     
    123123extern int ofw_memmap(memmap_t *map);
    124124extern int ofw_screen(screen_t *screen);
    125 extern int ofw_keyboard(keyboard_t *keyboard);
     125extern int ofw_macio(macio_t *macio);
    126126extern int setup_palette(void);
    127127extern void ofw_quiesce(void);
Note: See TracChangeset for help on using the changeset viewer.