Since the parse_ioports function be refactored, the template
of the root cell must make a modification to meet the parame-
ters changes.

Signed-off-by: Xuguo Wang <[email protected]>
---
 tools/root-cell-config.c.tmpl | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/tools/root-cell-config.c.tmpl b/tools/root-cell-config.c.tmpl
index 451869a..0a67d76 100644
--- a/tools/root-cell-config.c.tmpl
+++ b/tools/root-cell-config.c.tmpl
@@ -49,7 +49,7 @@ struct {
        __u64 cpus[${int((cpucount + 63) / 64)}];
        struct jailhouse_memory mem_regions[${len(regions)}];
        struct jailhouse_irqchip irqchips[${len(irqchips)}];
-       __u8 pio_bitmap[0x2000];
+       __u8 pio_bitmap[${pm_bitmap_size}];
        struct jailhouse_pci_device pci_devices[${len(pcidevices)}];
        struct jailhouse_pci_capability pci_caps[${len(pcicaps)}];
 } __attribute__((packed)) config = {
@@ -131,18 +131,13 @@ struct {
        },
 
        .pio_bitmap = {
-               [     0/8 ...   0x3f/8] = -1,
-               [  0x40/8 ...   0x47/8] = 0xf0, /* PIT */
-               [  0x48/8 ...   0x5f/8] = -1,
-               [  0x60/8 ...   0x67/8] = 0xec, /* HACK: NMI status/control */
-               [  0x68/8 ...   0x6f/8] = -1,
-               [  0x70/8 ...   0x77/8] = 0xfc, /* RTC */
-               [  0x78/8 ...   0x7f/8] = -1,
-               [  0x80/8 ...   0x87/8] = 0xfe, /* Linux: native_io_delay() */
-               [  0x88/8 ...  0x3af/8] = -1,
-               [ 0x3b0/8 ...  0x3df/8] = 0x00, /* VGA */
-               [ 0x3e0/8 ...  0xcff/8] = -1,
-               [ 0xd00/8 ... 0xffff/8] = 0, /* HACK: PCI bus */
+       % for k in pm_bitmap_regions:
+               % if k.typestr != '':
+               [${' 0x%04x' % k.start}/8 ... ${'0x%04x' % k.stop}/8] = 
${hex(k.value)}, /* ${k.typestr} */
+               % else:
+               [${' 0x%04x' % k.start}/8 ... ${'0x%04x' % k.stop}/8] = 
${hex(k.value)},
+               % endif
+        % endfor
        },
 
        .pci_devices = {
-- 
2.5.0

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to