How to calculate the memory capability via SRAT table

There is a test case for the calculation of the memory capability in the SRAT table.The ACPI dump file made me confuse, so I read the ACPI spec 6.2 for help.

Goog luck , there are more detail about SRAT table that are useful.

Both of Base Address High and Base Address Low are  the part of the base address which is a 64bit address.It is divided into two part :High address and Low  address, we need to combine two address together follow the rules of 16 hex.

Same as before,the memory length also is divided into two part, combine the high address and the low address  together.

According to the SRAT table reference, each node has its logical processor unit and memory unit, and they can not repeat the memory range of each other .The memory length is the memory unit capability .

So, Node memory range =Base address + Length

All of memeory capability =the sum of Node memory Length

Memory capablity Memory range
Base Address High 0x00000000      
Base Address Low   0x00000000    
Length High 0x00000000      
Length Low   0x80000000 80000000




Base Address High 0x00000001      
Base Address Low   0x00000000    
Length High 0x00000001      
Length Low   0x80000000 180000000




Base Address High 0x00000002      
Base Address Low   0x80000000    
Length High 0x00000003      
Length Low   0x00000000 300000000




Base Address High 0x00000005      
Base Address Low   0x80000000    
Length High 0x00000004      
Length Low   0x00000000 400000000




Total 36G