Revision c227f099 hw/nvram.h
b/hw/nvram.h | ||
---|---|---|
2 | 2 |
#define NVRAM_H |
3 | 3 |
|
4 | 4 |
/* NVRAM helpers */ |
5 |
typedef uint32_t (*a_nvram_read)(void *private, uint32_t addr);
|
|
6 |
typedef void (*a_nvram_write)(void *private, uint32_t addr, uint32_t val);
|
|
7 |
typedef struct nvram { |
|
5 |
typedef uint32_t (*nvram_read_t)(void *private, uint32_t addr);
|
|
6 |
typedef void (*nvram_write_t)(void *private, uint32_t addr, uint32_t val);
|
|
7 |
typedef struct nvram_t {
|
|
8 | 8 |
void *opaque; |
9 |
a_nvram_read read_fn;
|
|
10 |
a_nvram_write write_fn;
|
|
11 |
} a_nvram;
|
|
9 |
nvram_read_t read_fn;
|
|
10 |
nvram_write_t write_fn;
|
|
11 |
} nvram_t;
|
|
12 | 12 |
|
13 |
void NVRAM_set_byte (a_nvram *nvram, uint32_t addr, uint8_t value);
|
|
14 |
uint8_t NVRAM_get_byte (a_nvram *nvram, uint32_t addr);
|
|
15 |
void NVRAM_set_word (a_nvram *nvram, uint32_t addr, uint16_t value);
|
|
16 |
uint16_t NVRAM_get_word (a_nvram *nvram, uint32_t addr);
|
|
17 |
void NVRAM_set_lword (a_nvram *nvram, uint32_t addr, uint32_t value);
|
|
18 |
uint32_t NVRAM_get_lword (a_nvram *nvram, uint32_t addr);
|
|
19 |
void NVRAM_set_string (a_nvram *nvram, uint32_t addr,
|
|
13 |
void NVRAM_set_byte (nvram_t *nvram, uint32_t addr, uint8_t value);
|
|
14 |
uint8_t NVRAM_get_byte (nvram_t *nvram, uint32_t addr);
|
|
15 |
void NVRAM_set_word (nvram_t *nvram, uint32_t addr, uint16_t value);
|
|
16 |
uint16_t NVRAM_get_word (nvram_t *nvram, uint32_t addr);
|
|
17 |
void NVRAM_set_lword (nvram_t *nvram, uint32_t addr, uint32_t value);
|
|
18 |
uint32_t NVRAM_get_lword (nvram_t *nvram, uint32_t addr);
|
|
19 |
void NVRAM_set_string (nvram_t *nvram, uint32_t addr,
|
|
20 | 20 |
const char *str, uint32_t max); |
21 |
int NVRAM_get_string (a_nvram *nvram, uint8_t *dst, uint16_t addr, int max);
|
|
22 |
void NVRAM_set_crc (a_nvram *nvram, uint32_t addr,
|
|
21 |
int NVRAM_get_string (nvram_t *nvram, uint8_t *dst, uint16_t addr, int max);
|
|
22 |
void NVRAM_set_crc (nvram_t *nvram, uint32_t addr,
|
|
23 | 23 |
uint32_t start, uint32_t count); |
24 |
int PPC_NVRAM_set_params (a_nvram *nvram, uint16_t NVRAM_size,
|
|
24 |
int PPC_NVRAM_set_params (nvram_t *nvram, uint16_t NVRAM_size,
|
|
25 | 25 |
const char *arch, |
26 | 26 |
uint32_t RAM_size, int boot_device, |
27 | 27 |
uint32_t kernel_image, uint32_t kernel_size, |
... | ... | |
29 | 29 |
uint32_t initrd_image, uint32_t initrd_size, |
30 | 30 |
uint32_t NVRAM_image, |
31 | 31 |
int width, int height, int depth); |
32 |
typedef struct m48t59 a_m48t59;
|
|
32 |
typedef struct m48t59_t m48t59_t;
|
|
33 | 33 |
|
34 | 34 |
void m48t59_write (void *private, uint32_t addr, uint32_t val); |
35 | 35 |
uint32_t m48t59_read (void *private, uint32_t addr); |
36 | 36 |
void m48t59_toggle_lock (void *private, int lock); |
37 |
a_m48t59 *m48t59_init_isa(uint32_t io_base, uint16_t size, int type);
|
|
38 |
a_m48t59 *m48t59_init (qemu_irq IRQ, a_target_phys_addr mem_base,
|
|
37 |
m48t59_t *m48t59_init_isa(uint32_t io_base, uint16_t size, int type);
|
|
38 |
m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base,
|
|
39 | 39 |
uint32_t io_base, uint16_t size, |
40 | 40 |
int type); |
41 | 41 |
void m48t59_set_addr (void *opaque, uint32_t addr); |
Also available in: Unified diff