Changeset 110
- Timestamp:
- Jun 30, 2017, 9:56:38 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_ppm.c
r57 r110 1 1 /* 2 * hal_ gpt.C - Generic Physcal Page Table API implementation for the TSAR archtecture.2 * hal_ppm.c - Generic Physical Page Manager API implementation for x86 3 3 * 4 * Authors Alain Greiner (2016,2017) 5 * 6 * 7 * Copyright (c) UPMC Sorbonne Universites 4 * Copyright (c) 2017 Maxime Villard 8 5 * 9 6 * This file is part of ALMOS-MKH. … … 19 16 * 20 17 * You should have received a copy of the GNU General Public License 21 * along with ALMOS-MKH ; if not, write to the Free Software Foundation,18 * along with ALMOS-MKH.; if not, write to the Free Software Foundation, 22 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 23 20 */ … … 37 34 #include <hal_internal.h> 38 35 39 error_t hal_ppm_init( boot_info_t * info)36 error_t hal_ppm_init(boot_info_t *info) 40 37 { 38 size_t i; 39 40 // get relevant info from boot_info structure 41 uint32_t pages_nr = info->pages_nr; 42 uint32_t pages_tbl_offset = info->pages_offset; 43 uint32_t rsvd_nr = info->rsvd_nr; 44 45 // get pointer on local Physical Page Manager 46 ppm_t * ppm = &LOCAL_CLUSTER->ppm; 47 48 // initialize lock protecting the free_pages[] lists 49 spinlock_init( &ppm->free_lock ); 50 51 // initialize lock protecting the dirty_pages list 52 spinlock_init( &ppm->dirty_lock ); 53 54 // initialize all free_pages[] lists as empty 55 for( i = 0 ; i < CONFIG_PPM_MAX_ORDER ; i++ ) 56 { 57 list_root_init( &ppm->free_pages_root[i] ); 58 ppm->free_pages_nr[i] = 0; 59 } 60 61 // TODO 62 41 63 x86_panic((char *)__func__); 42 64 return 0;
Note: See TracChangeset
for help on using the changeset viewer.