• Heiko Carstens's avatar
    s390/mem_detect: fix memory type of first block · 00de54c8
    Heiko Carstens authored
    Fix a long-standing but currently irrelevant bug: the memory detection
    code performs a tprot instruction on address zero to figure out if the
    first memory chunk is readable or writable. Due to low address
    protection the result is "read-only". If the memory detection code
    would actually care, it would have to ignore the first memory
    increment, but it adds the memory increment to writable memory anyway.
    
    If memblock debugging is enabled this leads to an extra rather
    surprising call which registers memory. To avoid this get rid of the
    first misleading tprot call and simply assume that the first memory
    increment is writable. Otherwise we wouldn't have reached the memory
    detection code anyway.
    Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    00de54c8
mem_detect.c 1.55 KB