diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2021-04-29 08:49:41 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2021-04-29 08:49:41 +0200 |
| commit | fde8a1ab65d5e33d90123a3aaa9b5c15e249689f (patch) | |
| tree | 14134c0c2f322cbcba0989b78bd7057f76c157c3 /src/core | |
| parent | 067d6e340be698b0e26b7732215a1969e0e683f3 (diff) | |
Debug, add memory print driver
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/apic.hpp | 2 | ||||
| -rw-r--r-- | src/core/paging.cc | 2 | ||||
| -rw-r--r-- | src/core/paging.hpp | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/core/apic.hpp b/src/core/apic.hpp index a2670b3..1446edd 100644 --- a/src/core/apic.hpp +++ b/src/core/apic.hpp @@ -1,6 +1,6 @@ #pragma once -#include "include/boucane.hpp" +#include "boucane.hpp" void apic_enable();
\ No newline at end of file diff --git a/src/core/paging.cc b/src/core/paging.cc index ae390ff..c283c57 100644 --- a/src/core/paging.cc +++ b/src/core/paging.cc @@ -83,7 +83,7 @@ u64* paging_allocate_contiguous(int npages){ } } - printk("Could not allocate %d contigous pages. Kernel panic!",npages); + printk("Could not allocate %d contiguous pages. Kernel panic!",npages); while(1); return 0; } diff --git a/src/core/paging.hpp b/src/core/paging.hpp index 5817765..a3c2fec 100644 --- a/src/core/paging.hpp +++ b/src/core/paging.hpp @@ -25,11 +25,19 @@ paging_allocate_addr(kpages[0],((u64)(addr))+i,((u64)(addr))+i,PAGING_OPT_P|PAGING_OPT_RW,kvar_kernel_vma); \ }} + +#define PAGING_MAP2(addr,phy) paging_allocate_addr(kpages[0],(u64)(addr),(u64)(phy),PAGING_OPT_P|PAGING_OPT_RW,kvar_kernel_vma) +#define PAGING_MAP2_RANGE(addr, phy, n) { \ + for(u64 i=0;i<(n);i++){ \ + paging_allocate_addr(kpages[0],((u64)(addr))+i,((u64)(phy))+i,PAGING_OPT_P|PAGING_OPT_RW,kvar_kernel_vma); \ +}} + /// @brief All PAE table structures are allocated here extern u64 kpages[MAX_TABLES][512]; /// CF boucane.hpp extern u64 kvar_kernel_vma,kvar_stack_pma,kvar_userspace_pma; +extern void (*printk)(char *str,...); /** * Setup and enable PAE paging |
