VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-shutdown.c@ 60009

Last change on this file since 60009 was 58812, checked in by vboxsync, 9 years ago

bs3kit: Started on the switcher code.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
1
2#include "bs3kit.h"
3#include <iprt/assert.h>
4
5AssertCompileSize(uint16_t, 2);
6AssertCompileSize(uint32_t, 4);
7AssertCompileSize(uint64_t, 8);
8
9
10/* Just a sample. */
11BS3_DECL(void) Main_pe16(void)
12{
13 void BS3_FAR *pvTmp1;
14 void BS3_FAR *pvTmp2;
15 void BS3_FAR *pvTmp3;
16 void BS3_FAR *pvTmp4;
17
18 Bs3TestInit("bs3-shutdown");
19
20Bs3PrintStr("Bs3PrintX32:");
21Bs3PrintX32(UINT32_C(0xfdb97531));
22Bs3PrintStr("\r\n");
23
24Bs3Printf("Bs3Printf: RX32=%#'RX32 string='%s' d=%d p=%p\n", UINT32_C(0xfdb97531), "my string", 42, Main_pe16);
25
26pvTmp2 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
27Bs3PrintStr("pvTmp2=");
28Bs3PrintX32((uintptr_t)pvTmp2);
29Bs3PrintStr("\r\n");
30
31pvTmp3 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
32Bs3PrintStr("pvTmp3=");
33Bs3PrintX32((uintptr_t)pvTmp3);
34Bs3PrintStr("\r\n");
35Bs3MemFree(pvTmp2, _4K);
36
37pvTmp4 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
38Bs3PrintStr("pvTmp4=");
39Bs3PrintX32((uintptr_t)pvTmp4);
40Bs3PrintStr("\r\n");
41Bs3PrintStr("\r\n");
42
43pvTmp1 = Bs3MemAlloc(BS3MEMKIND_REAL, 31);
44Bs3PrintStr("pvTmp1=");
45Bs3PrintX32((uintptr_t)pvTmp1);
46Bs3PrintStr("\r\n");
47
48pvTmp2 = Bs3MemAlloc(BS3MEMKIND_REAL, 17);
49Bs3PrintStr("pvTmp2=");
50Bs3PrintX32((uintptr_t)pvTmp2);
51Bs3PrintStr("\r\n");
52
53Bs3MemFree(pvTmp1, 31);
54pvTmp3 = Bs3MemAlloc(BS3MEMKIND_REAL, 17);
55Bs3PrintStr("pvTmp3=");
56Bs3PrintX32((uintptr_t)pvTmp3);
57Bs3PrintStr("\r\n");
58
59
60Bs3Panic();
61 Bs3Shutdown();
62 return;
63}
64
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette