mirror of
https://github.com/dgibson/dtc.git
synced 2026-04-12 00:47:46 -04:00
pylibfdt: Add support for reading the memory reserve map
Add a way to access this information from Python. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
29bb05aa42
commit
483e170625
2 changed files with 42 additions and 0 deletions
|
|
@ -357,5 +357,13 @@ class PyLibfdtTests(unittest.TestCase):
|
|||
self.assertEquals(node2, self.fdt.node_offset_by_phandle(0x2001))
|
||||
|
||||
|
||||
def testReserveMap(self):
|
||||
"""Test that we can access the memory reserve map"""
|
||||
self.assertEquals(2, self.fdt.num_mem_rsv())
|
||||
self.assertEquals([ 0xdeadbeef00000000, 0x100000],
|
||||
self.fdt.get_mem_rsv(0))
|
||||
self.assertEquals([123456789, 010000], self.fdt.get_mem_rsv(1))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue