POK(kernelpart)
bsp.c
Go to the documentation of this file.
1 /*
2  * POK header
3  *
4  * The following file is a part of the POK project. Any modification should
5  * made according to the POK licence. You CANNOT use this file or a part of
6  * this file is this part of a file for your own project
7  *
8  * For more information on the POK licence, please see our LICENCE FILE
9  *
10  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
11  *
12  * Copyright (c) 2007-2009 POK team
13  *
14  * Created by julien on Thu Jan 15 23:34:13 2009
15  */
16 
17 
18 #include <errno.h>
19 #include <arch.h>
20 
21 #include "cons.h"
22 #include "pm.h"
23 #include "pit.h"
24 #include "pic.h"
25 
27 {
28  pok_cons_init ();
29  pok_pm_init ();
30  pok_pic_init ();
31 
32  return (POK_ERRNO_OK);
33 }
34 
36 {
37  pok_pic_eoi (irq);
38 
39  return (POK_ERRNO_OK);
40 }
41 
43  void (*handler)(void))
44 {
45  pok_pic_unmask (irq);
46 
47  pok_arch_event_register (32 + irq, handler);
48 
49  return (POK_ERRNO_OK);
50 }
51 
58 void *pok_bsp_mem_alloc (size_t size)
59 {
60  return ((void *)pok_pm_sbrk(size));
61 }
62 
68 {
69  return (pok_x86_qemu_timer_init ());
70 }
71