projects
/
seabios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename the apm, pcibios, and elf entry points.
[seabios.git]
/
src
/
pirtable.c
diff --git
a/src/pirtable.c
b/src/pirtable.c
index 705cc5032bff75b876b9b1070821a018a135d49b..4c3f1ffc486d7afc725f43687c63f0f1138da5d0 100644
(file)
--- a/
src/pirtable.c
+++ b/
src/pirtable.c
@@
-3,17
+3,22
@@
// Copyright (C) 2008 Kevin O'Connor <kevin@koconnor.net>
// Copyright (C) 2002 MandrakeSoft S.A.
//
// Copyright (C) 2008 Kevin O'Connor <kevin@koconnor.net>
// Copyright (C) 2002 MandrakeSoft S.A.
//
-// This file may be distributed under the terms of the GNU GPLv3 license.
+// This file may be distributed under the terms of the GNU
L
GPLv3 license.
#include "pci.h" // struct pir_header
#include "util.h" // checksum
#include "biosvar.h" // SET_EBDA
#include "pci.h" // struct pir_header
#include "util.h" // checksum
#include "biosvar.h" // SET_EBDA
+u16 PirOffset VAR16VISIBLE;
+
struct pir_table {
struct pir_header pir;
struct pir_slot slots[6];
struct pir_table {
struct pir_header pir;
struct pir_slot slots[6];
-} PACKED PIR_TABLE __attribute__((aligned(16))) = {
-#if CONFIG_PIRTABLE
+} PACKED;
+
+extern struct pir_table PIR_TABLE;
+#if CONFIG_PIRTABLE && !CONFIG_COREBOOT
+struct pir_table PIR_TABLE __aligned(16) VAR16EXPORT = {
.pir = {
.version = 0x0100,
.size = sizeof(struct pir_table),
.pir = {
.version = 0x0100,
.size = sizeof(struct pir_table),
@@
-83,11
+88,11
@@
struct pir_table {
.slot_nr = 5,
},
}
.slot_nr = 5,
},
}
-#endif // CONFIG_PIRTABLE
};
};
+#endif // CONFIG_PIRTABLE && !CONFIG_COREBOOT
void
void
-create_pirtable()
+create_pirtable(
void
)
{
if (! CONFIG_PIRTABLE)
return;
{
if (! CONFIG_PIRTABLE)
return;
@@
-95,6
+100,6
@@
create_pirtable()
dprintf(3, "init PIR table\n");
PIR_TABLE.pir.signature = PIR_SIGNATURE;
dprintf(3, "init PIR table\n");
PIR_TABLE.pir.signature = PIR_SIGNATURE;
- PIR_TABLE.pir.checksum
= -checksum((u8*)
&PIR_TABLE, sizeof(PIR_TABLE));
-
SET_EBDA(pir_loc, &PIR_TABLE.pir)
;
+ PIR_TABLE.pir.checksum
-= checksum(
&PIR_TABLE, sizeof(PIR_TABLE));
+
PirOffset = (u32)&PIR_TABLE.pir - BUILD_BIOS_ADDR
;
}
}