root / hw / nvram.h @ 99a0949b
History | View | Annotate | Download (1.9 kB)
1 | 87ecb68b | pbrook | #ifndef NVRAM_H
|
---|---|---|---|
2 | 87ecb68b | pbrook | #define NVRAM_H
|
3 | 87ecb68b | pbrook | |
4 | 87ecb68b | pbrook | /* NVRAM helpers */
|
5 | 99a0949b | malc | typedef uint32_t (*a_nvram_read)(void *private, uint32_t addr); |
6 | 99a0949b | malc | typedef void (*a_nvram_write)(void *private, uint32_t addr, uint32_t val); |
7 | 99a0949b | malc | typedef struct nvram { |
8 | 87ecb68b | pbrook | void *opaque;
|
9 | 99a0949b | malc | a_nvram_read read_fn; |
10 | 99a0949b | malc | a_nvram_write write_fn; |
11 | 99a0949b | malc | } a_nvram; |
12 | 87ecb68b | pbrook | |
13 | 99a0949b | malc | void NVRAM_set_byte (a_nvram *nvram, uint32_t addr, uint8_t value);
|
14 | 99a0949b | malc | uint8_t NVRAM_get_byte (a_nvram *nvram, uint32_t addr); |
15 | 99a0949b | malc | void NVRAM_set_word (a_nvram *nvram, uint32_t addr, uint16_t value);
|
16 | 99a0949b | malc | uint16_t NVRAM_get_word (a_nvram *nvram, uint32_t addr); |
17 | 99a0949b | malc | void NVRAM_set_lword (a_nvram *nvram, uint32_t addr, uint32_t value);
|
18 | 99a0949b | malc | uint32_t NVRAM_get_lword (a_nvram *nvram, uint32_t addr); |
19 | 99a0949b | malc | void NVRAM_set_string (a_nvram *nvram, uint32_t addr,
|
20 | b55266b5 | blueswir1 | const char *str, uint32_t max); |
21 | 99a0949b | malc | int NVRAM_get_string (a_nvram *nvram, uint8_t *dst, uint16_t addr, int max); |
22 | 99a0949b | malc | void NVRAM_set_crc (a_nvram *nvram, uint32_t addr,
|
23 | 87ecb68b | pbrook | uint32_t start, uint32_t count); |
24 | 99a0949b | malc | int PPC_NVRAM_set_params (a_nvram *nvram, uint16_t NVRAM_size,
|
25 | b55266b5 | blueswir1 | const char *arch, |
26 | 87ecb68b | pbrook | uint32_t RAM_size, int boot_device,
|
27 | 87ecb68b | pbrook | uint32_t kernel_image, uint32_t kernel_size, |
28 | 87ecb68b | pbrook | const char *cmdline, |
29 | 87ecb68b | pbrook | uint32_t initrd_image, uint32_t initrd_size, |
30 | 87ecb68b | pbrook | uint32_t NVRAM_image, |
31 | 87ecb68b | pbrook | int width, int height, int depth); |
32 | 99a0949b | malc | typedef struct m48t59 a_m48t59; |
33 | 87ecb68b | pbrook | |
34 | 87ecb68b | pbrook | void m48t59_write (void *private, uint32_t addr, uint32_t val); |
35 | 87ecb68b | pbrook | uint32_t m48t59_read (void *private, uint32_t addr);
|
36 | 87ecb68b | pbrook | void m48t59_toggle_lock (void *private, int lock); |
37 | 99a0949b | malc | a_m48t59 *m48t59_init_isa(uint32_t io_base, uint16_t size, int type);
|
38 | 99a0949b | malc | a_m48t59 *m48t59_init (qemu_irq IRQ, a_target_phys_addr mem_base, |
39 | 87ecb68b | pbrook | uint32_t io_base, uint16_t size, |
40 | 87ecb68b | pbrook | int type);
|
41 | 9596ebb7 | pbrook | void m48t59_set_addr (void *opaque, uint32_t addr); |
42 | 87ecb68b | pbrook | |
43 | 87ecb68b | pbrook | #endif /* !NVRAM_H */ |