Changeset 1f5c9c96 in mainline for kernel/genarch/include


Ignore:
Timestamp:
2011-12-02T17:29:43Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b8b1e631, c3887ad
Parents:
c48f6ab
Message:

implement multiboot v2 specification and use it in GRUB for UEFI

  • improve multiboot v1 code, move defines to a common location
  • rename VESA framebuffer stuff to generic "boot framebuffer"
  • small collateral changes
Location:
kernel/genarch/include
Files:
1 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/genarch/include/fb/bfb.h

    rc48f6ab r1f5c9c96  
    2727 */
    2828
    29 /** @addtogroup ia32
     29/** @addtogroup genarch
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #ifndef KERN_ia32_VESA_H_
    36 #define KERN_ia32_VESA_H_
     35#ifndef KERN_BFB_H_
     36#define KERN_BFB_H_
    3737
    3838#include <typedefs.h>
    3939
    40 extern bool vesa_init(void);
     40extern uintptr_t bfb_addr;
     41extern uint32_t bfb_width;
     42extern uint32_t bfb_height;
     43extern uint16_t bfb_bpp;
     44extern uint32_t bfb_scanline;
     45
     46extern uint8_t bfb_red_pos;
     47extern uint8_t bfb_red_size;
     48
     49extern uint8_t bfb_green_pos;
     50extern uint8_t bfb_green_size;
     51
     52extern uint8_t bfb_blue_pos;
     53extern uint8_t bfb_blue_size;
     54
     55extern bool bfb_init(void);
    4156
    4257#endif
  • kernel/genarch/include/multiboot/multiboot.h

    rc48f6ab r1f5c9c96  
    3636#define KERN_MULTIBOOT_H_
    3737
     38#define MULTIBOOT_HEADER_MAGIC  0x1badb002
     39#define MULTIBOOT_HEADER_FLAGS  0x00010003
     40
     41#define MULTIBOOT_LOADER_MAGIC  0x2badb002
     42
     43#ifndef __ASM__
     44
    3845#include <typedefs.h>
    3946#include <arch/boot/memmap.h>
     47
     48/** Convert 32-bit multiboot address to a pointer. */
     49#define MULTIBOOT_PTR(mba)  ((void *) (uintptr_t) (mba))
    4050
    4151/** Multiboot 32-bit address. */
    4252typedef uint32_t mbaddr_t;
    4353
    44 /** Multiboot mod structure */
     54/** Multiboot module structure */
    4555typedef struct {
    4656        mbaddr_t start;
     
    4858        mbaddr_t string;
    4959        uint32_t reserved;
    50 } __attribute__ ((packed)) multiboot_mod_t;
     60} __attribute__((packed)) multiboot_module_t;
    5161
    5262/** Multiboot mmap structure */
     
    5464        uint32_t size;
    5565        e820memmap_t mm_info;
    56 } __attribute__ ((packed)) multiboot_mmap_t;
     66} __attribute__((packed)) multiboot_memmap_t;
    5767
    5868/** Multiboot information structure */
     
    7484       
    7585        /* ... */
    76 } __attribute__ ((packed)) multiboot_info_t;
     86} __attribute__((packed)) multiboot_info_t;
    7787
    7888enum multiboot_info_flags {
    79         MBINFO_FLAGS_MEM     = 0x01,
    80         MBINFO_FLAGS_BOOT    = 0x02,
    81         MBINFO_FLAGS_CMDLINE = 0x04,
    82         MBINFO_FLAGS_MODS    = 0x08,
    83         MBINFO_FLAGS_SYMS1   = 0x10,
    84         MBINFO_FLAGS_SYMS2   = 0x20,
    85         MBINFO_FLAGS_MMAP    = 0x40
     89        MULTIBOOT_INFO_FLAGS_MEM     = 0x01,
     90        MULTIBOOT_INFO_FLAGS_BOOT    = 0x02,
     91        MULTIBOOT_INFO_FLAGS_CMDLINE = 0x04,
     92        MULTIBOOT_INFO_FLAGS_MODS    = 0x08,
     93        MULTIBOOT_INFO_FLAGS_SYMS1   = 0x10,
     94        MULTIBOOT_INFO_FLAGS_SYMS2   = 0x20,
     95        MULTIBOOT_INFO_FLAGS_MMAP    = 0x40
    8696       
    8797        /* ... */
    8898};
    8999
    90 #define MULTIBOOT_LOADER_MAGIC  0x2BADB002
     100extern void multiboot_extract_command(char *, size_t, const char *);
     101extern void multiboot_info_parse(uint32_t, const multiboot_info_t *);
    91102
    92 /** Convert 32-bit multiboot address to a pointer. */
    93 #define MULTIBOOT_PTR(mba) ((void *)(uintptr_t) (mba))
    94 
    95 extern void multiboot_info_parse(uint32_t, const multiboot_info_t *);
     103#endif /* __ASM__ */
    96104
    97105#endif
Note: See TracChangeset for help on using the changeset viewer.