Commit Graph

9 Commits

Author SHA1 Message Date
Mathias Krause 81f859c572 drivers/linux: reinstantiate DMA32 allocations
Commit 81fa32bd7e ("drivers/linux: enforce address requirement for
IOCTL_ALLOC_PHYSMEM") tried to enforce the physical address constraints
provided by the user. However, it's broken for the memory range 16M-4G
as there's no DMA32 kmalloc cache, making the request allocate from the
normal zone which is free to return an address above 4GB for systems
with enough RAM.

Commit d010b82b0d ("Fix malloc issue in Linux driver") worked around
that issue by simple dropping the DMA32 allocation and only using DMA
allocations for which kmalloc slabs do exist.

As the DMA zone is a scarce resource and might be exhausted already, use
a different allocation scheme for chipsec that directly allocates memory
from the page allocator which honours both, DMA and DMA32 requests.

Also fix the allocation list handling while at it. The stored physical
address might be truncated on 32-bit PAE systems because of the use of
'physaddr_t' instead of 'phys_addr_t'.

Signed-off-by: Mathias Krause <minipli@grsecurity.net>
2022-08-26 11:52:02 -07:00
BrentHoltsclaw e2d2442b08 Add #define to make future changes easier 2019-01-17 11:30:20 -08:00
BrentHoltsclaw 3a515e9cfb Address issue #249
changed drivers/linux/include/chipsec.h to start from 'C'
added logic to compute ioctl base based upon changes to chipsec.h above
2019-01-17 11:30:20 -08:00
Erik Bjorge 02df863cdd Reverting to previous memory access method.
More debug is required before switching to this updated method for memory access.

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2018-10-01 10:32:20 -07:00
BrentHoltsclaw deee07d173 Change linux READ/WRITE Physical Memory Functionality 2018-03-06 17:50:48 -08:00
Erik Bjorge 9a5e095342 Revert "Change linux READ/WRITE Physical Memory Functionality"
This reverts commit 3c1c6906f9.

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2018-02-26 10:24:19 -08:00
BrentHoltsclaw 3c1c6906f9 Change linux READ/WRITE Physical Memory Functionality 2018-02-23 09:35:28 -08:00
abazhaniuk c377a72e28 Deb package (#135)
* merge

* Add Debian packaging

* cleanup

* Removed incorrect info into Copyright.

* One more: removed incorrect info in Copyright.
2017-01-06 12:57:13 -08:00
abazhaniuk 94fe7f02f1 change setup.py build driver by default. change root directory of chipsec. move WARNING.txt to chipsec. remove PKG-INFO (#107) 2016-10-18 18:19:42 -07:00