/* Copyright (C) 2008 Emmanuel Varoquaux This file is part of XOS. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _I386_H #define _I386_H #define WORD_SIZE 4U /* taille d'un mot */ #define ALIGN(addr) (((addr) + (WORD_SIZE - 1)) & ~(WORD_SIZE - 1)) #define PAGE_SIZE 4096U /* taille d'une page */ #define LOG_PAGE_SIZE 12 #define PAGE(addr) ((addr) & ~(PAGE_SIZE - 1)) #define PAGE_ALIGN(addr) PAGE((addr) + (PAGE_SIZE - 1)) #define PAGE_OFFSET(addr) ((addr) & (PAGE_SIZE - 1)) #endif