2021-10-08 19:32:46 +02:00
|
|
|
#ifndef __VXBOOT_HARDWARE_H__
|
|
|
|
# define __VXBOOT_HARDWARE_H__
|
|
|
|
|
2021-12-18 13:52:13 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
|
2021-10-08 19:32:46 +02:00
|
|
|
/* define hardware information struct */
|
|
|
|
struct hwinfo {
|
|
|
|
struct {
|
|
|
|
struct {
|
|
|
|
uintptr_t origin_addr;
|
2022-01-14 11:40:24 +01:00
|
|
|
uintptr_t kernel_addr;
|
2021-10-08 19:32:46 +02:00
|
|
|
uintptr_t user_addr;
|
|
|
|
} physical;
|
|
|
|
size_t size;
|
2021-12-18 13:52:13 +01:00
|
|
|
size_t available;
|
2021-10-08 19:32:46 +02:00
|
|
|
} ram;
|
|
|
|
};
|
|
|
|
|
|
|
|
//---
|
|
|
|
// hardware information API
|
|
|
|
//---
|
|
|
|
|
|
|
|
/* hardware_get_info() : get hardware information */
|
2021-12-18 13:52:13 +01:00
|
|
|
extern int hardware_get_info(struct hwinfo * const hwinfo);
|
2021-10-08 19:32:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
#endif /*__VXBOOT_HARDWARE_H__*/
|