COBE 0.1 ALPHA

D:/COBE-Packet/cobe/system/pmm.h

gehe zur Dokumentation dieser Datei
00001 #ifndef PMM_H
00002 #define PMM_H
00003 
00004 #include <stdint.h>
00005 
00006 //MULTIBOOT HEADER       by FreeSoft
00007 typedef struct elf_section_header_table {
00008     unsigned long num;
00009     unsigned long size;
00010     unsigned long addr;
00011     unsigned long shndx;
00012 } elf_section_header_table_t;
00013 
00014  typedef struct aout_symbol_table {
00015     unsigned long tabsize;
00016     unsigned long strsize;
00017     unsigned long addr;
00018     unsigned long reserved;
00019 } aout_symbol_table_t;
00020 
00021 typedef struct multiboot_info {
00022     unsigned long flags;
00023     unsigned long mem_lower;
00024     unsigned long mem_upper;
00025     unsigned long boot_device;
00026     unsigned long cmdline;
00027     unsigned long mods_count;
00028     unsigned long mods_addr;
00029     union
00030     {
00031                 aout_symbol_table_t aout_sym;
00032                 elf_section_header_table_t elf_sec;
00033     } u;
00034     unsigned long mmap_length;
00035     unsigned long mmap_addr;
00036     } multiboot_info_t;
00037         
00038 typedef struct module {
00039     unsigned long mod_start;
00040     unsigned long mod_end;
00041     unsigned long string;
00042     unsigned long reserved;
00043 } module_t;
00044 
00045 typedef struct memory_map_struct {
00046         uint32_t size;
00047         uint64_t base;
00048         uint64_t length;
00049         uint32_t type;
00050 } __attribute__((packed)) memory_map_t;
00051 
00052 void init_pmm(multiboot_info_t*);
00053 void* pmm_alloc();
00054 void pmm_free(void*);
00055 void pmm_mark_used(void*);
00056 
00057 #endif
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Makrodefinitionen