mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Remove the test functions from HVM highmem 32-bit BIOS.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
This commit is contained in:
1 parent
2d52e184e5
commit
d8a689313b
4 files changed
+14
-114
No files matched your search
@@ -23,26 +23,6 @@
|
||||
#include "jumptable.h"
|
||||
#include "32bitprotos.h"
|
||||
|
||||
/* same prototypes as in the 16bit BIOS */
|
||||
Bit32u multiply(Bit32u a, Bit32u b)
|
||||
{
|
||||
return a*b;
|
||||
}
|
||||
|
||||
Bit32u add(Bit32u a, Bit32u b)
|
||||
{
|
||||
return a+b;
|
||||
}
|
||||
|
||||
static Bit32u stat_a = 0x1;
|
||||
Bit32u set_static(Bit32u a)
|
||||
{
|
||||
Bit32u _a = stat_a;
|
||||
stat_a = a;
|
||||
return _a;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
the jumptable that will be copied into the rombios in the 0xf000 segment
|
||||
for every function that is to be called from the lower BIOS, make an entry
|
||||
@@ -51,10 +31,6 @@ Bit32u set_static(Bit32u a)
|
||||
#define TABLE_ENTRY(idx, func) [idx] = (uint32_t)func
|
||||
uint32_t jumptable[IDX_LAST+1] __attribute__((section (JUMPTABLE_SECTION_NAME))) =
|
||||
{
|
||||
TABLE_ENTRY(IDX_MULTIPLY , multiply),
|
||||
TABLE_ENTRY(IDX_ADD , add),
|
||||
TABLE_ENTRY(IDX_SET_STATIC , set_static),
|
||||
|
||||
TABLE_ENTRY(IDX_TCPA_ACPI_INIT, tcpa_acpi_init),
|
||||
TABLE_ENTRY(IDX_TCPA_EXTEND_ACPI_LOG, tcpa_extend_acpi_log),
|
||||
|
||||
|
||||
@@ -418,71 +418,4 @@ ASM_END
|
||||
#include "32bitprotos.h"
|
||||
#include "32bitgateway.h"
|
||||
|
||||
/********************************************************************
|
||||
Collection of stub functions for functions executed in 32bit space
|
||||
*******************************************************************/
|
||||
|
||||
Bit32u multiply(a, b) /* for testing */
|
||||
Bit32u a;
|
||||
Bit32u b;
|
||||
{
|
||||
ASM_START
|
||||
DoUpcall IDX_MULTIPLY
|
||||
ASM_END
|
||||
}
|
||||
|
||||
Bit32u add(a, b) /* for testing */
|
||||
Bit32u a;
|
||||
Bit32u b;
|
||||
{
|
||||
ASM_START
|
||||
DoUpcall IDX_ADD
|
||||
ASM_END
|
||||
}
|
||||
|
||||
Bit32u set_static(a, b) /* for testing */
|
||||
Bit32u a;
|
||||
Bit32u b;
|
||||
{
|
||||
ASM_START
|
||||
DoUpcall IDX_SET_STATIC
|
||||
ASM_END
|
||||
}
|
||||
|
||||
/* a function to test the gateway */
|
||||
void
|
||||
test_gateway()
|
||||
{
|
||||
Bit32u res;
|
||||
Bit16u err = 0;
|
||||
|
||||
printf("32bit gateway ");
|
||||
res = multiply(11111L,222L);
|
||||
if (err = 0 && res != 11111L * 222L) {
|
||||
printf("not working correctly: multiply\n");
|
||||
err = 1;
|
||||
}
|
||||
|
||||
res = add(111111L, 222222L);
|
||||
if (err = 0 && res != 111111L + 222222L) {
|
||||
printf("not working correctly: add\n");
|
||||
err = 1;
|
||||
}
|
||||
|
||||
res = set_static(0x12345678L);
|
||||
if (err = 0 && res != 0x1L) {
|
||||
printf("not working correctly: set_static (1)\n");
|
||||
err = 1;
|
||||
}
|
||||
res = set_static(0x11111111L);
|
||||
if (err = 0 && res != 0x12345678L) {
|
||||
printf("not working correctly: set_static (2)\n");
|
||||
err = 1;
|
||||
}
|
||||
|
||||
if (err == 0) {
|
||||
printf("working correctly\n");
|
||||
}
|
||||
}
|
||||
|
||||
#include "tcgbios.c"
|
||||
@@ -5,25 +5,21 @@
|
||||
/* shared include file for bcc and gcc */
|
||||
|
||||
/* bcc does not like 'enum' */
|
||||
#define IDX_MULTIPLY 0
|
||||
#define IDX_ADD 1
|
||||
#define IDX_SET_STATIC 2
|
||||
#define IDX_TCGINTERRUPTHANDLER 0
|
||||
#define IDX_TCPA_ACPI_INIT 1
|
||||
#define IDX_TCPA_EXTEND_ACPI_LOG 2
|
||||
#define IDX_TCPA_CALLING_INT19H 3
|
||||
#define IDX_TCPA_RETURNED_INT19H 4
|
||||
#define IDX_TCPA_ADD_EVENT_SEPARATORS 5
|
||||
#define IDX_TCPA_WAKE_EVENT 6
|
||||
#define IDX_TCPA_ADD_BOOTDEVICE 7
|
||||
#define IDX_TCPA_START_OPTION_ROM_SCAN 8
|
||||
#define IDX_TCPA_OPTION_ROM 9
|
||||
#define IDX_TCPA_IPL 10
|
||||
#define IDX_TCPA_INITIALIZE_TPM 11
|
||||
#define IDX_TCPA_MEASURE_POST 12
|
||||
|
||||
#define IDX_TCGINTERRUPTHANDLER 3
|
||||
#define IDX_TCPA_ACPI_INIT 4
|
||||
#define IDX_TCPA_EXTEND_ACPI_LOG 5
|
||||
#define IDX_TCPA_CALLING_INT19H 6
|
||||
#define IDX_TCPA_RETURNED_INT19H 7
|
||||
#define IDX_TCPA_ADD_EVENT_SEPARATORS 8
|
||||
#define IDX_TCPA_WAKE_EVENT 9
|
||||
#define IDX_TCPA_ADD_BOOTDEVICE 10
|
||||
#define IDX_TCPA_START_OPTION_ROM_SCAN 11
|
||||
#define IDX_TCPA_OPTION_ROM 12
|
||||
#define IDX_TCPA_IPL 13
|
||||
#define IDX_TCPA_INITIALIZE_TPM 14
|
||||
#define IDX_TCPA_MEASURE_POST 15
|
||||
|
||||
#define IDX_LAST 16 /* keep last! */
|
||||
#define IDX_LAST 13 /* keep last! */
|
||||
|
||||
|
||||
#ifdef GCC_PROTOS
|
||||
@@ -33,10 +29,6 @@
|
||||
#define PARMS(x...)
|
||||
#endif
|
||||
|
||||
Bit32u multiply( PARMS(Bit32u a, Bit32u b) );
|
||||
Bit32u add( PARMS(Bit32u a, Bit32u b) );
|
||||
Bit32u set_static( PARMS(Bit32u) );
|
||||
|
||||
Bit32u TCGInterruptHandler( PARMS(pushad_regs_t *regs, Bit32u esds, Bit32u flags_ptr));
|
||||
|
||||
void tcpa_acpi_init( PARMS(void) );
|
||||
|
||||
@@ -1860,7 +1860,6 @@ print_bios_banner()
|
||||
printf("TCG-enabled BIOS.\n");
|
||||
#endif
|
||||
printf("\n");
|
||||
test_gateway();
|
||||
}
|
||||
|
||||
|
||||
|
||||