summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot/BootKit/BootKit.hxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-03 20:39:06 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-03 20:39:06 +0100
commitf99e383775fa43c5c1354067962b1590ff2abdae (patch)
treef83a9b232c0424963fc9989b517e53f903ee036f /Private/NewBoot/BootKit/BootKit.hxx
parent0ca5d0d92ee326f3deda797403c27090bd0784ab (diff)
NewBoot: Will work on AHCI instead, ATA is not getting any further in
the future. Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/BootKit/BootKit.hxx')
-rw-r--r--Private/NewBoot/BootKit/BootKit.hxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx
index 6fdbacaf..d1584d8a 100644
--- a/Private/NewBoot/BootKit/BootKit.hxx
+++ b/Private/NewBoot/BootKit/BootKit.hxx
@@ -56,13 +56,13 @@ HCore::SizeT BSetMem(CharacterType *src, const CharacterType byte,
const HCore::SizeT len);
/**
- * @brief BootKit Image Reader class
- * Reads using the UEFI Simple File protocol.
+ * @brief BootKit File Reader class
+ * Reads using the New Filesystem Boot partition.
*/
-class BImageReader final {
+class BFileReader final {
public:
- explicit BImageReader(const CharacterType *path);
- ~BImageReader() = default;
+ explicit BFileReader(const CharacterType *path);
+ ~BFileReader() = default;
HCore::VoidPtr Fetch(SizeT &size);
@@ -78,8 +78,8 @@ class BImageReader final {
Int32 &Error() { return mErrorCode; }
public:
- BImageReader &operator=(const BImageReader &) = default;
- BImageReader(const BImageReader &) = default;
+ BFileReader &operator=(const BFileReader &) = default;
+ BFileReader(const BFileReader &) = default;
private:
Int32 mErrorCode{kOperationOkay};
@@ -115,21 +115,21 @@ inline void Out32(UInt16 port, UInt32 value) {
}
inline UInt8 In8(UInt16 port) {
- UInt8 value = 0UL;
+ UInt8 value;
asm volatile("inb %1, %%al" : "=a"(value) : "Nd"(port) : "memory");
return value;
}
inline UInt16 In16(UInt16 port) {
- UInt16 value = 0UL;
- asm volatile("in %%dx, %%ax" : "=a"(value) : "d"(port));
+ UInt16 value;
+ asm volatile("inw %%dx, %%ax" : "=a"(value) : "d"(port));
return value;
}
inline UInt32 In32(UInt16 port) {
- UInt32 value = 0UL;
+ UInt32 value;
asm volatile("inl %1, %%eax" : "=a"(value) : "Nd"(port) : "memory");
return value;