diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-04 14:00:50 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-06 08:31:13 +0100 |
commit | d60e9aa5f5a21374950dfd15bedafeccf76c3b1d (patch) | |
tree | e50c6df4a5f508ecfcd8fe727b5c23a397ec4189 /commands | |
parent | 1455e221ae3023270a4716be6b47c038249955fd (diff) | |
download | barebox-d60e9aa5f5a21374950dfd15bedafeccf76c3b1d.tar.gz barebox-d60e9aa5f5a21374950dfd15bedafeccf76c3b1d.tar.xz |
misc: fix /dev/mem size
The size of /dev/mem was limited to the lower half of the 64bit address
range. This is unfortunate since on some architectures (MIPS64, namely)
the upper half contains meaningful addresses. We can't just set /dev/mem
to its real size since that's bigger than the maximum loff_t. Set the
DEVFS_IS_CHARACTER_DEV flag instead for /dev/mem which will cause the
size checks in lseek and friends to be bypassed.
Also fix the size the memory device is registered with. We used to set
the size to ~0, but the real size is one higher. To do this explicitly
register the device with specifying the end address rather than the
size. This will make /dev/mem appear with filesize 0, but so does
/dev/zero already.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
0 files changed, 0 insertions, 0 deletions