VirtualBox

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

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

bs3kit: Early printf.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 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_rm(void)
12{
13 void BS3_FAR *pvTmp1;
14 void BS3_FAR *pvTmp2;
15 void BS3_FAR *pvTmp3;
16 void BS3_FAR *pvTmp4;
17 Bs3InitMemory_rm();
18
19 Bs3TestInit("bs3-shutdown");
20
21Bs3PrintStr("Bs3PrintX32:");
22Bs3PrintX32(UINT32_C(0xfdb97531));
23Bs3PrintStr("\r\n");
24
25Bs3PrintF("Bs3PrintF: RX32=%RX32\n", UINT32_C(0xfdb97531));
26
27pvTmp2 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
28Bs3PrintStr("pvTmp2=");
29Bs3PrintX32((uintptr_t)pvTmp2);
30Bs3PrintStr("\r\n");
31
32pvTmp3 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
33Bs3PrintStr("pvTmp3=");
34Bs3PrintX32((uintptr_t)pvTmp3);
35Bs3PrintStr("\r\n");
36Bs3MemFree(pvTmp2, _4K);
37
38pvTmp4 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
39Bs3PrintStr("pvTmp4=");
40Bs3PrintX32((uintptr_t)pvTmp4);
41Bs3PrintStr("\r\n");
42Bs3PrintStr("\r\n");
43
44pvTmp1 = Bs3MemAlloc(BS3MEMKIND_REAL, 31);
45Bs3PrintStr("pvTmp1=");
46Bs3PrintX32((uintptr_t)pvTmp1);
47Bs3PrintStr("\r\n");
48
49pvTmp2 = Bs3MemAlloc(BS3MEMKIND_REAL, 17);
50Bs3PrintStr("pvTmp2=");
51Bs3PrintX32((uintptr_t)pvTmp2);
52Bs3PrintStr("\r\n");
53
54Bs3MemFree(pvTmp1, 31);
55pvTmp3 = Bs3MemAlloc(BS3MEMKIND_REAL, 17);
56Bs3PrintStr("pvTmp3=");
57Bs3PrintX32((uintptr_t)pvTmp3);
58Bs3PrintStr("\r\n");
59
60
61Bs3Panic();
62 Bs3Shutdown();
63 return;
64}
65
Note: See TracBrowser for help on using the repository browser.

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