Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Merge branch 'devel'
[palacios.git] / kitten / kernel / elf.c
1 #include <lwk/kernel.h>
2 #include <lwk/cpuinfo.h>
3 #include <lwk/elf.h>
4 #include <arch/uaccess.h>
5
6 int
7 elf_hwcap(id_t cpu, uint32_t *hwcap)
8 {
9         if (!cpu_isset(cpu, cpu_online_map))
10                 return -ENOENT;
11         *hwcap = ELF_HWCAP(cpu);
12         return 0;
13 }
14
15 int
16 sys_elf_hwcap(id_t cpu, uint32_t __user *hwcap)
17 {
18         int status;
19         uint32_t _hwcap;
20         
21         if ((status = elf_hwcap(cpu, &_hwcap)) != 0)
22                 return status;
23
24         if (hwcap && copy_to_user(hwcap, &_hwcap, sizeof(_hwcap)))
25                 return -EINVAL;
26
27         return 0;
28 }