[PATCH v2 1/3] i386/a-b-bootblock: factor test memory addresses out into constants

Daniil Tatianin posted 3 patches 1 year ago
Maintainers: Juan Quintela <quintela@redhat.com>, Peter Xu <peterx@redhat.com>, Leonardo Bras <leobras@redhat.com>, Thomas Huth <thuth@redhat.com>
[PATCH v2 1/3] i386/a-b-bootblock: factor test memory addresses out into constants
Posted by Daniil Tatianin 1 year ago
So that we have less magic numbers to deal with. This also allows us to
reuse these in the following commits.

Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Peter Xu <peterx@redhat.com>
---
 tests/migration/i386/a-b-bootblock.S | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/migration/i386/a-b-bootblock.S b/tests/migration/i386/a-b-bootblock.S
index 3d464c7568..036216e4a7 100644
--- a/tests/migration/i386/a-b-bootblock.S
+++ b/tests/migration/i386/a-b-bootblock.S
@@ -34,6 +34,10 @@ start:             # at 0x7c00 ?
         mov $16,%eax
         mov %eax,%ds
 
+# Start from 1MB
+.set TEST_MEM_START, (1024*1024)
+.set TEST_MEM_END, (100*1024*1024)
+
         mov $65,%ax
         mov $0x3f8,%dx
         outb %al,%dx
@@ -41,12 +45,11 @@ start:             # at 0x7c00 ?
         # bl keeps a counter so we limit the output speed
         mov $0, %bl
 mainloop:
-        # Start from 1MB
-        mov $(1024*1024),%eax
+        mov $TEST_MEM_START,%eax
 innerloop:
         incb (%eax)
         add $4096,%eax
-        cmp $(100*1024*1024),%eax
+        cmp $TEST_MEM_END,%eax
         jl innerloop
 
         inc %bl
-- 
2.34.1
Re: [PATCH v2 1/3] i386/a-b-bootblock: factor test memory addresses out into constants
Posted by Juan Quintela 11 months, 3 weeks ago
Daniil Tatianin <d-tatianin@yandex-team.ru> wrote:
> So that we have less magic numbers to deal with. This also allows us to
> reuse these in the following commits.
>
> Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
> Reviewed-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

queued.
Re: [PATCH v2 1/3] i386/a-b-bootblock: factor test memory addresses out into constants
Posted by Daniil Tatianin 11 months, 3 weeks ago

                
            
Re: [PATCH v2 1/3] i386/a-b-bootblock: factor test memory addresses out into constants
Posted by Vladimir Sementsov-Ogievskiy 12 months ago
On 19.09.23 13:23, Daniil Tatianin wrote:
> So that we have less magic numbers to deal with. This also allows us to
> reuse these in the following commits.
> 
> Signed-off-by: Daniil Tatianin<d-tatianin@yandex-team.ru>
> Reviewed-by: Peter Xu<peterx@redhat.com>


Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>

-- 
Best regards,
Vladimir