Changeset 635 for trunk/hal/tsar_mips32/drivers/soclib_pic.c
- Timestamp:
- Jun 26, 2019, 11:42:37 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_pic.c
r629 r635 2 2 * soclib_pic.c - soclib PIC driver implementation. 3 3 * 4 * Author Alain Greiner (2016,2017 )4 * Author Alain Greiner (2016,2017,2018,2019) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 27 27 #include <errno.h> 28 28 #include <string.h> 29 #include <bits.h> 29 30 #include <vfs.h> 30 31 #include <rpc.h> … … 287 288 { 288 289 // allocate memory for core extension 289 req.type = KMEM_ GENERIC;290 req. size = sizeof(soclib_pic_core_t);290 req.type = KMEM_KCM; 291 req.order = bits_log2( sizeof(soclib_pic_core_t) ); 291 292 req.flags = AF_KERNEL; 292 293 core_ext_ptr = kmem_alloc( &req ); 293 294 294 assert( (core_ext_ptr != NULL) , 295 "cannot allocate memory for core extension\n"); 295 if( core_ext_ptr == NULL ) 296 { 297 printk("\n[PANIC] in %s : cannot allocate memory for core extension\n", 298 __FUNCTION__ ); 299 } 296 300 297 301 // reset the HWI / WTI interrupt vectors … … 304 308 305 309 // allocate memory for cluster extension 306 req.type = KMEM_ GENERIC;307 req. size = sizeof(soclib_pic_cluster_t);310 req.type = KMEM_KCM; 311 req.order = bits_log2( sizeof(soclib_pic_cluster_t) ); 308 312 req.flags = AF_KERNEL; 309 313 cluster_ext_ptr = kmem_alloc( &req ); 310 314 311 assert( (cluster_ext_ptr != NULL) , 312 "cannot allocate memory for cluster extension\n"); 315 if( cluster_ext_ptr == NULL ) 316 { 317 printk("\n[PANIC] in %s : cannot allocate memory for cluster extension\n", 318 __FUNCTION__ ); 319 } 320 321 assert( (cluster_ext_ptr != NULL) , "cannot allocate memory for cluster extension"); 313 322 314 323 // get XCU characteristics from the XCU config register
Note: See TracChangeset
for help on using the changeset viewer.