gitee.com/mirrors_u-root/u-root@v7.0.0+incompatible/pkg/memio/seek_linux.go (about) 1 // Copyright 2012-2020 the u-root Authors. All rights reserved 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build !arm,!arm64 6 7 package memio 8 9 // Read reads data from physical memory at address addr. On x86 platforms, 10 // this uses the seek+read syscalls. On arm platforms, this uses mmap. 11 func Read(addr int64, data UintN) error { 12 return pathRead(memPath, addr, data) 13 } 14 15 // Write writes data to physical memory at address addr. On x86 platforms, this 16 // uses the seek+read syscalls. On arm platforms, this uses mmap. 17 func Write(addr int64, data UintN) error { 18 return pathWrite(memPath, addr, data) 19 }