direct-io.hg
changeset 13644:edbff1762a55
Remove the test functions from HVM highmem 32-bit BIOS.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author | kaf24@localhost.localdomain |
---|---|
date | Fri Jan 26 16:39:38 2007 +0000 (2007-01-26) |
parents | c07326324f8d |
children | 4dd3266e13a7 |
files | tools/firmware/rombios/32bit/32bitbios.c tools/firmware/rombios/32bitgateway.c tools/firmware/rombios/32bitprotos.h tools/firmware/rombios/rombios.c |
line diff
1.1 --- a/tools/firmware/rombios/32bit/32bitbios.c Fri Jan 26 16:38:32 2007 +0000 1.2 +++ b/tools/firmware/rombios/32bit/32bitbios.c Fri Jan 26 16:39:38 2007 +0000 1.3 @@ -23,26 +23,6 @@ 1.4 #include "jumptable.h" 1.5 #include "32bitprotos.h" 1.6 1.7 -/* same prototypes as in the 16bit BIOS */ 1.8 -Bit32u multiply(Bit32u a, Bit32u b) 1.9 -{ 1.10 - return a*b; 1.11 -} 1.12 - 1.13 -Bit32u add(Bit32u a, Bit32u b) 1.14 -{ 1.15 - return a+b; 1.16 -} 1.17 - 1.18 -static Bit32u stat_a = 0x1; 1.19 -Bit32u set_static(Bit32u a) 1.20 -{ 1.21 - Bit32u _a = stat_a; 1.22 - stat_a = a; 1.23 - return _a; 1.24 -} 1.25 - 1.26 - 1.27 /* 1.28 the jumptable that will be copied into the rombios in the 0xf000 segment 1.29 for every function that is to be called from the lower BIOS, make an entry 1.30 @@ -51,10 +31,6 @@ Bit32u set_static(Bit32u a) 1.31 #define TABLE_ENTRY(idx, func) [idx] = (uint32_t)func 1.32 uint32_t jumptable[IDX_LAST+1] __attribute__((section (JUMPTABLE_SECTION_NAME))) = 1.33 { 1.34 - TABLE_ENTRY(IDX_MULTIPLY , multiply), 1.35 - TABLE_ENTRY(IDX_ADD , add), 1.36 - TABLE_ENTRY(IDX_SET_STATIC , set_static), 1.37 - 1.38 TABLE_ENTRY(IDX_TCPA_ACPI_INIT, tcpa_acpi_init), 1.39 TABLE_ENTRY(IDX_TCPA_EXTEND_ACPI_LOG, tcpa_extend_acpi_log), 1.40
2.1 --- a/tools/firmware/rombios/32bitgateway.c Fri Jan 26 16:38:32 2007 +0000 2.2 +++ b/tools/firmware/rombios/32bitgateway.c Fri Jan 26 16:39:38 2007 +0000 2.3 @@ -418,71 +418,4 @@ ASM_END 2.4 #include "32bitprotos.h" 2.5 #include "32bitgateway.h" 2.6 2.7 -/******************************************************************** 2.8 - Collection of stub functions for functions executed in 32bit space 2.9 - *******************************************************************/ 2.10 - 2.11 -Bit32u multiply(a, b) /* for testing */ 2.12 - Bit32u a; 2.13 - Bit32u b; 2.14 -{ 2.15 - ASM_START 2.16 - DoUpcall IDX_MULTIPLY 2.17 - ASM_END 2.18 -} 2.19 - 2.20 -Bit32u add(a, b) /* for testing */ 2.21 - Bit32u a; 2.22 - Bit32u b; 2.23 -{ 2.24 - ASM_START 2.25 - DoUpcall IDX_ADD 2.26 - ASM_END 2.27 -} 2.28 - 2.29 -Bit32u set_static(a, b) /* for testing */ 2.30 - Bit32u a; 2.31 - Bit32u b; 2.32 -{ 2.33 - ASM_START 2.34 - DoUpcall IDX_SET_STATIC 2.35 - ASM_END 2.36 -} 2.37 - 2.38 -/* a function to test the gateway */ 2.39 -void 2.40 -test_gateway() 2.41 -{ 2.42 - Bit32u res; 2.43 - Bit16u err = 0; 2.44 - 2.45 - printf("32bit gateway "); 2.46 - res = multiply(11111L,222L); 2.47 - if (err = 0 && res != 11111L * 222L) { 2.48 - printf("not working correctly: multiply\n"); 2.49 - err = 1; 2.50 - } 2.51 - 2.52 - res = add(111111L, 222222L); 2.53 - if (err = 0 && res != 111111L + 222222L) { 2.54 - printf("not working correctly: add\n"); 2.55 - err = 1; 2.56 - } 2.57 - 2.58 - res = set_static(0x12345678L); 2.59 - if (err = 0 && res != 0x1L) { 2.60 - printf("not working correctly: set_static (1)\n"); 2.61 - err = 1; 2.62 - } 2.63 - res = set_static(0x11111111L); 2.64 - if (err = 0 && res != 0x12345678L) { 2.65 - printf("not working correctly: set_static (2)\n"); 2.66 - err = 1; 2.67 - } 2.68 - 2.69 - if (err == 0) { 2.70 - printf("working correctly\n"); 2.71 - } 2.72 -} 2.73 - 2.74 #include "tcgbios.c"
3.1 --- a/tools/firmware/rombios/32bitprotos.h Fri Jan 26 16:38:32 2007 +0000 3.2 +++ b/tools/firmware/rombios/32bitprotos.h Fri Jan 26 16:39:38 2007 +0000 3.3 @@ -5,25 +5,21 @@ 3.4 /* shared include file for bcc and gcc */ 3.5 3.6 /* bcc does not like 'enum' */ 3.7 -#define IDX_MULTIPLY 0 3.8 -#define IDX_ADD 1 3.9 -#define IDX_SET_STATIC 2 3.10 +#define IDX_TCGINTERRUPTHANDLER 0 3.11 +#define IDX_TCPA_ACPI_INIT 1 3.12 +#define IDX_TCPA_EXTEND_ACPI_LOG 2 3.13 +#define IDX_TCPA_CALLING_INT19H 3 3.14 +#define IDX_TCPA_RETURNED_INT19H 4 3.15 +#define IDX_TCPA_ADD_EVENT_SEPARATORS 5 3.16 +#define IDX_TCPA_WAKE_EVENT 6 3.17 +#define IDX_TCPA_ADD_BOOTDEVICE 7 3.18 +#define IDX_TCPA_START_OPTION_ROM_SCAN 8 3.19 +#define IDX_TCPA_OPTION_ROM 9 3.20 +#define IDX_TCPA_IPL 10 3.21 +#define IDX_TCPA_INITIALIZE_TPM 11 3.22 +#define IDX_TCPA_MEASURE_POST 12 3.23 3.24 -#define IDX_TCGINTERRUPTHANDLER 3 3.25 -#define IDX_TCPA_ACPI_INIT 4 3.26 -#define IDX_TCPA_EXTEND_ACPI_LOG 5 3.27 -#define IDX_TCPA_CALLING_INT19H 6 3.28 -#define IDX_TCPA_RETURNED_INT19H 7 3.29 -#define IDX_TCPA_ADD_EVENT_SEPARATORS 8 3.30 -#define IDX_TCPA_WAKE_EVENT 9 3.31 -#define IDX_TCPA_ADD_BOOTDEVICE 10 3.32 -#define IDX_TCPA_START_OPTION_ROM_SCAN 11 3.33 -#define IDX_TCPA_OPTION_ROM 12 3.34 -#define IDX_TCPA_IPL 13 3.35 -#define IDX_TCPA_INITIALIZE_TPM 14 3.36 -#define IDX_TCPA_MEASURE_POST 15 3.37 - 3.38 -#define IDX_LAST 16 /* keep last! */ 3.39 +#define IDX_LAST 13 /* keep last! */ 3.40 3.41 3.42 #ifdef GCC_PROTOS 3.43 @@ -33,10 +29,6 @@ 3.44 #define PARMS(x...) 3.45 #endif 3.46 3.47 -Bit32u multiply( PARMS(Bit32u a, Bit32u b) ); 3.48 -Bit32u add( PARMS(Bit32u a, Bit32u b) ); 3.49 -Bit32u set_static( PARMS(Bit32u) ); 3.50 - 3.51 Bit32u TCGInterruptHandler( PARMS(pushad_regs_t *regs, Bit32u esds, Bit32u flags_ptr)); 3.52 3.53 void tcpa_acpi_init( PARMS(void) );