diff options
author | Helge Deller <deller@gmx.de> | 2021-02-10 20:35:45 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2021-09-24 11:10:17 +0200 |
commit | 711bd2f3e52dcb2b1b3133da8467a1848de45066 (patch) | |
tree | b9659e5c028284fa873da8d43cde4b24bf71e4c6 /src/types.h | |
parent | aa416f6af76e71a2fa24ca85485c62d61ceb6ca3 (diff) | |
download | seabios-hppa-711bd2f3e52dcb2b1b3133da8467a1848de45066.zip seabios-hppa-711bd2f3e52dcb2b1b3133da8467a1848de45066.tar.gz seabios-hppa-711bd2f3e52dcb2b1b3133da8467a1848de45066.tar.bz2 |
Add portaddr_t typedef to specify I/O port addresses
On x86 I/O ports are located below address 0x4000, while
on PA-RISC I/O ports are allowed in the whole 32/64 bit
address space.
So, introduce a portaddr_t typedef which defaults to the
current u16 type on x86 and to unsigned long on PA-RISC.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'src/types.h')
-rw-r--r-- | src/types.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/types.h b/src/types.h index 19d9f6c..5887ecf 100644 --- a/src/types.h +++ b/src/types.h @@ -21,11 +21,17 @@ union u64_u32_u { u64 val; }; +#if MODE16 == 1 +typedef u16 portaddr_t; +#else +typedef unsigned int portaddr_t; +#endif + // Definition for common 16bit segment/offset pointers. struct segoff_s { union { struct { - u16 offset; + portaddr_t offset; u16 seg; }; u32 segoff; |