Ignore:
Timestamp:
Jun 21, 2017, 8:35:30 AM (7 years ago)
Author:
max@…
Message:

Update. The kernel now enables the GDT/IDT, and has trap entries. A
x86_printf function is added for debugging purposes only. The new Makefile
will come in another commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/hal_boot.h

    r25 r29  
    22 * hal_boot.h - General values used by the boot procedure
    33 *
    4  * Author        Maxime Villard (2017)
     4 * Copyright (c) 2017 Maxime Villard
     5 *
     6 * This file is part of ALMOS-MKH.
    57 *
    6  * Copyright (c) UPMC Sorbonne Universites
    7  *
    8  * This file is part of ALMOS-kernel.
    9  *
    10  * ALMOS-kernel is free software; you can redistribute it and/or modify it
     8 * ALMOS-MKH is free software; you can redistribute it and/or modify it
    119 * under the terms of the GNU General Public License as published by
    1210 * the Free Software Foundation; version 2.0 of the License.
    1311 *
    14  * ALMOS-kernel is distributed in the hope that it will be useful, but
     12 * ALMOS-MKH is distributed in the hope that it will be useful, but
    1513 * WITHOUT ANY WARRANTY; without even the implied warranty of
    1614 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     
    1816 *
    1917 * You should have received a copy of the GNU General Public License
    20  * along with ALMOS-kernel; if not, write to the Free Software Foundation,
     18 * along with ALMOS-MKH.; if not, write to the Free Software Foundation,
    2119 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    2220 */
     
    3634/* -------------------------------------------------------------------------- */
    3735
     36#define ASM_ALIGN_TEXT  .align 16
     37#define ASM_ENTRY(x) \
     38        .text; ASM_ALIGN_TEXT; .globl x; .type x,@function; x:
     39
     40/* -------------------------------------------------------------------------- */
     41
    3842#define PSL_MBO         0x00000002
    3943
    4044#define STKPAGES        4
     45#define STKSIZE         (PAGE_SIZE * STKPAGES)
    4146
    4247#define NKL4_KIMG_ENTRIES       1
     
    107112#define L4_SLOT_KERNBASE        511
    108113
     114/*
     115 * L3 = (KERNBASE % NBPD_L4) / NBPD_L3
     116 * L2 = (KERNBASE % NBPD_L3) / NBPD_L2
     117 */
     118#define L3_SLOT_KERNBASE        510
     119#define L2_SLOT_KERNBASE        0
     120
    109121#define PDIR_SLOT_KERN  L4_SLOT_KERN
    110122#define PDIR_SLOT_PTE   L4_SLOT_PTE
Note: See TracChangeset for help on using the changeset viewer.