Home
last modified time | relevance | path

Searched refs:nvram (Results 1 – 25 of 25) sorted by relevance

/qemu/hw/nvram/
H A Dspapr_nvram.c63 SpaprNvram *nvram = spapr->nvram; in OBJECT_DECLARE_SIMPLE_TYPE() local
72 if (!nvram) { in OBJECT_DECLARE_SIMPLE_TYPE()
83 || ((offset + len) > nvram->size)) { in OBJECT_DECLARE_SIMPLE_TYPE()
89 assert(nvram->buf); in OBJECT_DECLARE_SIMPLE_TYPE()
92 memcpy(membuf, nvram->buf + offset, len); in OBJECT_DECLARE_SIMPLE_TYPE()
104 SpaprNvram *nvram = spapr->nvram; in rtas_nvram_store() local
114 if (!nvram) { in rtas_nvram_store()
124 || ((offset + len) > nvram->size)) { in rtas_nvram_store()
132 if (nvram->blk) { in rtas_nvram_store()
133 ret = blk_pwrite(nvram->blk, offset, len, membuf, 0); in rtas_nvram_store()
[all …]
H A Dds1225y.c118 NvRamState nvram; member
124 NvRamState *s = &sys->nvram; in nvram_sysbus_realize()
146 DEFINE_PROP_UINT32("size", SysBusNvRamState, nvram.chip_size, 0x2000),
147 DEFINE_PROP_STRING("filename", SysBusNvRamState, nvram.filename),
H A Dchrp_nvram.c28 static int chrp_nvram_set_var(uint8_t *nvram, int addr, const char *str, in chrp_nvram_set_var() argument
39 memcpy(&nvram[addr], str, len); in chrp_nvram_set_var()
/qemu/hw/ppc/
H A Dprep.c77 static inline uint32_t nvram_read(Nvram *nvram, uint32_t addr) in nvram_read() argument
79 NvramClass *k = NVRAM_GET_CLASS(nvram); in nvram_read()
80 return (k->read)(nvram, addr); in nvram_read()
83 static inline void nvram_write(Nvram *nvram, uint32_t addr, uint32_t val) in nvram_write() argument
85 NvramClass *k = NVRAM_GET_CLASS(nvram); in nvram_write()
86 (k->write)(nvram, addr, val); in nvram_write()
89 static void NVRAM_set_byte(Nvram *nvram, uint32_t addr, uint8_t value) in NVRAM_set_byte() argument
91 nvram_write(nvram, addr, value); in NVRAM_set_byte()
94 static uint8_t NVRAM_get_byte(Nvram *nvram, uint32_t addr) in NVRAM_get_byte() argument
96 return nvram_read(nvram, addr); in NVRAM_get_byte()
[all …]
H A Dspapr.c1827 spapr->nvram = (struct SpaprNvram *)dev; in spapr_create_nvram()
/qemu/hw/rtc/
H A Dds1338.c40 uint8_t nvram[NVRAM_SIZE]; member
53 VMSTATE_UINT8_ARRAY(nvram, DS1338State, NVRAM_SIZE),
67 s->nvram[0] = to_bcd(now.tm_sec); in capture_current_time()
68 s->nvram[1] = to_bcd(now.tm_min); in capture_current_time()
69 if (s->nvram[2] & HOURS_12) { in capture_current_time()
75 s->nvram[2] = HOURS_12 | to_bcd(tmp); in capture_current_time()
77 s->nvram[2] = HOURS_12 | HOURS_PM | to_bcd(tmp - 12); in capture_current_time()
80 s->nvram[2] = to_bcd(now.tm_hour); in capture_current_time()
82 s->nvram[3] = (now.tm_wday + s->wday_offset) % 7 + 1; in capture_current_time()
83 s->nvram[4] = to_bcd(now.tm_mday); in capture_current_time()
[all …]
H A Drs5c372.c36 uint8_t nvram[NVRAM_SIZE]; member
50 s->nvram[0] = to_bcd(now.tm_sec); in capture_current_time()
51 s->nvram[1] = to_bcd(now.tm_min); in capture_current_time()
52 if (s->nvram[0xf] & CTRL2_24) { in capture_current_time()
53 s->nvram[2] = to_bcd(now.tm_hour); in capture_current_time()
60 s->nvram[2] = to_bcd(tmp); in capture_current_time()
62 s->nvram[2] = HOURS_PM | to_bcd(tmp - 12); in capture_current_time()
65 s->nvram[3] = (now.tm_wday + s->wday_offset) % 7 + 1; in capture_current_time()
66 s->nvram[4] = to_bcd(now.tm_mday); in capture_current_time()
67 s->nvram[5] = to_bcd(now.tm_mon + 1); in capture_current_time()
[all …]
/qemu/hw/sparc64/
H A Dniagara.c43 MemoryRegion nvram; member
115 memory_region_init_ram(&s->nvram, NULL, "sun4v.nvram", NIAGARA_NVRAM_SIZE, in niagara_init()
117 memory_region_add_subregion(sysmem, NIAGARA_NVRAM_BASE, &s->nvram); in niagara_init()
H A Dsun4u.c124 static int sun4u_NVRAM_set_params(Nvram *nvram, uint16_t NVRAM_size, in sun4u_NVRAM_set_params() argument
137 NvramClass *k = NVRAM_GET_CLASS(nvram); in sun4u_NVRAM_set_params()
150 (k->write)(nvram, i, image[i]); in sun4u_NVRAM_set_params()
548 Nvram *nvram; in sun4uv_init() local
666 nvram = NVRAM(dev); in sun4uv_init()
675 sun4u_NVRAM_set_params(nvram, NVRAM_SIZE, "Sun4u", machine->ram_size, in sun4uv_init()
/qemu/hw/acpi/
H A Derst.c621 uint8_t *nvram; in read_erst_record() local
629 nvram = get_nvram_ptr_by_index(s, index); in read_erst_record()
632 &nvram[UEFI_CPER_RECORD_LENGTH_OFFSET], in read_erst_record()
643 memcpy(exchange, nvram, record_length); in read_erst_record()
666 uint8_t *nvram = NULL; in write_erst_record() local
704 nvram = get_nvram_ptr_by_index(s, index); in write_erst_record()
710 nvram = get_nvram_ptr_by_index(s, index); in write_erst_record()
716 if (nvram) { in write_erst_record()
718 memcpy(nvram, exchange, record_length); in write_erst_record()
719 memset(nvram + record_length, 0xFF, exchange_length - record_length); in write_erst_record()
H A Dtrace-events71 acpi_erst_realizefn_out(unsigned size) "total nvram size %u bytes"
/qemu/hw/misc/macio/
H A Dmacio.c172 if (!qdev_realize(DEVICE(&os->nvram), BUS(&s->macio_bus), errp)) { in macio_oldworld_realize()
175 sbd = SYS_BUS_DEVICE(&os->nvram); in macio_oldworld_realize()
178 pmac_format_nvram_partition(&os->nvram, os->nvram.size); in macio_oldworld_realize()
218 object_initialize_child(obj, "nvram", &os->nvram, TYPE_MACIO_NVRAM); in macio_oldworld_init()
219 dev = DEVICE(&os->nvram); in macio_oldworld_init()
/qemu/docs/interop/
H A Dfirmware.json221 # will not use flash for nvram. When loading the
322 # @nvram-template: Identifies the NVRAM template compatible with
327 # @nvram-template.@filename for each new virtual
328 # machine definition created. @nvram-template.@filename
335 … if=none,id=pflash1,readonly=off,file=FILENAME_OF_PRIVATE_NVRAM_FILE,format=@nvram-template.@format
339 …ve if=pflash,unit=1,readonly=off,file=FILENAME_OF_PRIVATE_NVRAM_FILE,format=@nvram-template.@format
346 '*nvram-template' : 'FirmwareFlashFile' } }
/qemu/include/hw/misc/macio/
H A Dmacio.h128 MacIONVRAMState nvram; member
/qemu/hw/
H A Dmeson.build26 subdir('nvram') subdir
H A DKconfig27 source nvram/Kconfig
/qemu/hw/sparc/
H A Dsun4m.c146 static void nvram_init(Nvram *nvram, uint8_t *macaddr, in nvram_init() argument
155 NvramClass *k = NVRAM_GET_CLASS(nvram); in nvram_init()
169 (k->write)(nvram, i, image[i]); in nvram_init()
816 Nvram *nvram; in sun4m_hw_init() local
953 nvram = NVRAM(dev); in sun4m_hw_init()
1043 nvram_init(nvram, hostid.a, machine->kernel_cmdline, in sun4m_hw_init()
/qemu/pc-bios/
H A Dmeson.build87 'vof-nvram.bin',
/qemu/docs/system/ppc/
H A Dpseries.rst126 * A NVRAM device (``spapr-nvram``).
133 In the case of the default ``spapr-nvram`` device, if someone wants to make the
139 NVRAM device with ``-global spapr-nvram.drive=pfid``.
H A Damigang.rst24 * 4 KiB NVRAM (use ``-drive if=mtd,format=raw,file=nvram.bin`` to keep contents persistent)
/qemu/include/hw/ppc/
H A Dspapr.h192 struct SpaprNvram *nvram; member
/qemu/
H A DMAINTAINERS1382 F: hw/nvram/ds1225y.c
1493 F: hw/nvram/mac_nvram.c
1498 F: include/hw/nvram/mac_nvram.h
1730 F: include/hw/nvram/sun_nvram.h
2621 F: hw/nvram/chrp_nvram.c
2622 F: include/hw/nvram/chrp_nvram.h
2738 F: hw/nvram/fw_cfg*.c
2740 F: include/hw/nvram/fw_cfg.h
H A Dmeson.build3662 'hw/nvram',
H A Dqemu-options.hx5093 " set OpenBIOS nvram variables\n",
5097 Set OpenBIOS nvram variable to given value (PPC, SPARC only).
/qemu/tests/data/qobject/
H A Dqdict.txt1468 autcpu12-nvram.c: 3124