1 # x86 bootblock used in migration test
2 # repeatedly increments the first byte of each page in a 100MB
4 # Outputs an initial 'A' on serial followed by repeated 'B's
6 # run tests/migration/rebuild-x86-bootblock.sh
7 # to regenerate the hex, and remember to include both the .h and .s
10 # Copyright (c) 2016 Red Hat, Inc. and/or its affiliates
11 # This work is licensed under the terms of the GNU GPL, version 2 or later.
12 # See the COPYING file in the top-level directory.
14 # Author: dgilbert@redhat.com
22 .type start, @function
27 mov
%eax
,%cr0 # Protected mode enable
28 data32 ljmp $
8,$
0x7c20
32 # A20 enable - not sure I actually need this
37 # set up DS for the whole of RAM (needed on KVM)
45 # bl keeps a counter so we limit the output speed
53 cmp $
(100*1024*1024),%eax
65 # GDT magic from old (GPLv2) Grub startup.S
66 .p2align 2 /* force 4-byte alignment */
72 * base = 0x00000000, limit = 0xFFFFF (4 KiB Granularity), present
73 * type = 32bit code execute/read, DPL = 0
76 .byte 0, 0x9A, 0xCF, 0
79 * base = 0x00000000, limit 0xFFFFF (4 KiB Granularity), present
80 * type = 32 bit data read/write, DPL = 0
83 .byte 0, 0x92, 0xCF, 0
86 .word 0x27 /* limit */
89 /* I'm a bootable disk */