Attention is currently required from: Nico Huber, Angel Pons, Anastasia Klimchuk. Sergii Dmytruk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/59075 )
Change subject: [RFC][WPTST] tests: test write protection ......................................................................
Patch Set 11:
(3 comments)
File tests/chip_wp.c:
https://review.coreboot.org/c/flashrom/+/59075/comment/ae7c96f8_921ab392 PS11, Line 143: 0x00fff000
Where does this magic number come from?
It's size of the chip (16 MiB) minus 4 KiB. Made code compute it instead.
https://review.coreboot.org/c/flashrom/+/59075/comment/995f3d67_4a872d7a PS11, Line 326: assert_int_equal(0x004000, range.start); : assert_int_equal(0xffc000, range.len);
Maybe I don't understand this properly, but aren't the values flipped?
In the comment above:
* Multiplaying that by base unit gives 16 KiB protected region at the * bottom, which is then complemented.
So the values are correct. This is the protected range and it starts at 16 KiB and goes until the end of the chip 16 MiB. I've added that "bottom" means start of the chip.
https://review.coreboot.org/c/flashrom/+/59075/comment/4adbb025_385c9584 PS11, Line 391: 0x1000
Sorry I have just realised, for this test to work as expected range. […]
Done