On Fri, Aug 14, 2015 at 10:52:03PM +0800, Xiao Guangrong wrote: > @@ -257,14 +258,91 @@ static void build_nfit_table(GSList *device_list, char > *buf) > } > } > > +struct dsm_buffer { > + /* RAM page. */ > + uint32_t handle; > + uint8_t arg0[16]; > + uint32_t arg1; > + uint32_t arg2; > + union { > + char arg3[PAGE_SIZE - 3 * sizeof(uint32_t) - 16 * sizeof(uint8_t)]; > + }; > + > + /* MMIO page. */ > + union { > + uint32_t notify; > + char pedding[PAGE_SIZE];
s/pedding/padding/ > + }; > +}; > + > +static ram_addr_t dsm_addr; > +static size_t dsm_size; > + > +static uint64_t dsm_read(void *opaque, hwaddr addr, > + unsigned size) > +{ > + return 0; > +} > + > +static void dsm_write(void *opaque, hwaddr addr, > + uint64_t val, unsigned size) > +{ > +} > + > +static const MemoryRegionOps dsm_ops = { > + .read = dsm_read, > + .write = dsm_write, > + .endianness = DEVICE_LITTLE_ENDIAN, > +}; > + > +static int build_dsm_buffer(void) > +{ > + MemoryRegion *dsm_ram_mr, *dsm_mmio_mr; > + ram_addr_t addr;; s/;;/;/